<!DOCTYPE html>
<html lang="zh-CN">
<head>
  <meta charset="UTF-8">
<meta name="viewport" content="width=device-width">
<meta name="theme-color" content="#222"><meta name="generator" content="Hexo 7.3.0">

  <link rel="apple-touch-icon" sizes="180x180" href="/images/apple-touch-icon-next.png">
  <link rel="icon" type="image/png" sizes="32x32" href="/images/favicon-32x32.ico">
  <link rel="icon" type="image/png" sizes="16x16" href="/images/favicon-16x16.ico">
  <link rel="mask-icon" href="/images/logo.svg" color="#222">

<link rel="stylesheet" href="/css/main.css">



<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.1/css/all.min.css" integrity="sha256-wiz7ZSCn/btzhjKDQBms9Hx4sSeUYsDrTLg7roPstac=" crossorigin="anonymous">
  <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/animate.css/3.1.1/animate.min.css" integrity="sha256-PR7ttpcvz8qrF57fur/yAx1qXMFJeJFiA6pSzWi0OIE=" crossorigin="anonymous">
  <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/fancyapps-ui/5.0.28/fancybox/fancybox.css" integrity="sha256-6cQIC71/iBIYXFK+0RHAvwmjwWzkWd+r7v/BX3/vZDc=" crossorigin="anonymous">
  <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/pace/1.2.4/themes/green/pace-theme-minimal.css">
  <script src="https://cdnjs.cloudflare.com/ajax/libs/pace/1.2.4/pace.min.js" integrity="sha256-gqd7YTjg/BtfqWSwsJOvndl0Bxc8gFImLEkXQT8+qj0=" crossorigin="anonymous"></script>

<script class="next-config" data-name="main" type="application/json">{"hostname":"sumumm.github.io","root":"/","images":"/images","scheme":"Gemini","darkmode":false,"version":"8.19.2","exturl":false,"sidebar":{"position":"left","display":"post","padding":18,"offset":12},"copycode":{"enable":true,"style":"mac"},"fold":{"enable":true,"height":300},"bookmark":{"enable":false,"color":"#222","save":"auto"},"mediumzoom":false,"lazyload":true,"pangu":false,"comments":{"style":"tabs","active":null,"storage":true,"lazyload":false,"nav":null},"stickytabs":false,"motion":{"enable":true,"async":true,"transition":{"menu_item":"fadeInDown","post_block":"fadeIn","post_header":"fadeInDown","post_body":"fadeInDown","coll_header":"fadeInLeft","sidebar":"fadeInUp"}},"i18n":{"placeholder":"搜索...","empty":"没有找到任何搜索结果：${query}","hits_time":"找到 ${hits} 个搜索结果（用时 ${time} 毫秒）","hits":"找到 ${hits} 个搜索结果"},"path":"/search.xml","localsearch":{"enable":true,"trigger":"auto","top_n_per_article":1,"unescape":false,"preload":false}}</script><script src="/js/config.js"></script>

    <meta name="description" content="本文主要网络环境的搭建——VMware使用双网卡的相关笔记，若笔记中有错误或者不合适的地方，欢迎批评指正😃。">
<meta property="og:type" content="article">
<meta property="og:title" content="LV02-03-网络环境-01-网络开发环境搭建">
<meta property="og:url" content="https://sumumm.github.io/post/717d15a2.html">
<meta property="og:site_name" content="苏木">
<meta property="og:description" content="本文主要网络环境的搭建——VMware使用双网卡的相关笔记，若笔记中有错误或者不合适的地方，欢迎批评指正😃。">
<meta property="og:locale" content="zh_CN">
<meta property="og:image" content="https://fanhua-picture.oss-cn-hangzhou.aliyuncs.com/01%E5%B5%8C%E5%85%A5%E5%BC%8F%E5%BC%80%E5%8F%91/02IMX6ULL%E5%B9%B3%E5%8F%B0/LV02-%E5%BC%80%E5%8F%91%E7%8E%AF%E5%A2%83/LV02-03-%E7%BD%91%E7%BB%9C%E7%8E%AF%E5%A2%83-01-%E7%BD%91%E7%BB%9C%E5%BC%80%E5%8F%91%E7%8E%AF%E5%A2%83%E6%90%AD%E5%BB%BA/img/image-20230717200554402.png">
<meta property="og:image" content="https://fanhua-picture.oss-cn-hangzhou.aliyuncs.com/01%E5%B5%8C%E5%85%A5%E5%BC%8F%E5%BC%80%E5%8F%91/02IMX6ULL%E5%B9%B3%E5%8F%B0/LV02-%E5%BC%80%E5%8F%91%E7%8E%AF%E5%A2%83/LV02-03-%E7%BD%91%E7%BB%9C%E7%8E%AF%E5%A2%83-01-%E7%BD%91%E7%BB%9C%E5%BC%80%E5%8F%91%E7%8E%AF%E5%A2%83%E6%90%AD%E5%BB%BA/img/image-20220718200404678.png">
<meta property="og:image" content="https://fanhua-picture.oss-cn-hangzhou.aliyuncs.com/01%E5%B5%8C%E5%85%A5%E5%BC%8F%E5%BC%80%E5%8F%91/02IMX6ULL%E5%B9%B3%E5%8F%B0/LV02-%E5%BC%80%E5%8F%91%E7%8E%AF%E5%A2%83/LV02-03-%E7%BD%91%E7%BB%9C%E7%8E%AF%E5%A2%83-01-%E7%BD%91%E7%BB%9C%E5%BC%80%E5%8F%91%E7%8E%AF%E5%A2%83%E6%90%AD%E5%BB%BA/img/image-20240828070841191.png">
<meta property="og:image" content="https://fanhua-picture.oss-cn-hangzhou.aliyuncs.com/01%E5%B5%8C%E5%85%A5%E5%BC%8F%E5%BC%80%E5%8F%91/02IMX6ULL%E5%B9%B3%E5%8F%B0/LV02-%E5%BC%80%E5%8F%91%E7%8E%AF%E5%A2%83/LV02-03-%E7%BD%91%E7%BB%9C%E7%8E%AF%E5%A2%83-01-%E7%BD%91%E7%BB%9C%E5%BC%80%E5%8F%91%E7%8E%AF%E5%A2%83%E6%90%AD%E5%BB%BA/img/image-20240828070911740.png">
<meta property="og:image" content="https://fanhua-picture.oss-cn-hangzhou.aliyuncs.com/01%E5%B5%8C%E5%85%A5%E5%BC%8F%E5%BC%80%E5%8F%91/02IMX6ULL%E5%B9%B3%E5%8F%B0/LV02-%E5%BC%80%E5%8F%91%E7%8E%AF%E5%A2%83/LV02-03-%E7%BD%91%E7%BB%9C%E7%8E%AF%E5%A2%83-01-%E7%BD%91%E7%BB%9C%E5%BC%80%E5%8F%91%E7%8E%AF%E5%A2%83%E6%90%AD%E5%BB%BA/img/image-20240917073009061.png">
<meta property="og:image" content="https://fanhua-picture.oss-cn-hangzhou.aliyuncs.com/01%E5%B5%8C%E5%85%A5%E5%BC%8F%E5%BC%80%E5%8F%91/02IMX6ULL%E5%B9%B3%E5%8F%B0/LV02-%E5%BC%80%E5%8F%91%E7%8E%AF%E5%A2%83/LV02-03-%E7%BD%91%E7%BB%9C%E7%8E%AF%E5%A2%83-01-%E7%BD%91%E7%BB%9C%E5%BC%80%E5%8F%91%E7%8E%AF%E5%A2%83%E6%90%AD%E5%BB%BA/img/image-20240828071120835.png">
<meta property="og:image" content="https://fanhua-picture.oss-cn-hangzhou.aliyuncs.com/01%E5%B5%8C%E5%85%A5%E5%BC%8F%E5%BC%80%E5%8F%91/02IMX6ULL%E5%B9%B3%E5%8F%B0/LV02-%E5%BC%80%E5%8F%91%E7%8E%AF%E5%A2%83/LV02-03-%E7%BD%91%E7%BB%9C%E7%8E%AF%E5%A2%83-01-%E7%BD%91%E7%BB%9C%E5%BC%80%E5%8F%91%E7%8E%AF%E5%A2%83%E6%90%AD%E5%BB%BA/img/image-20230717201127295.png">
<meta property="og:image" content="https://fanhua-picture.oss-cn-hangzhou.aliyuncs.com/01%E5%B5%8C%E5%85%A5%E5%BC%8F%E5%BC%80%E5%8F%91/02IMX6ULL%E5%B9%B3%E5%8F%B0/LV02-%E5%BC%80%E5%8F%91%E7%8E%AF%E5%A2%83/LV02-03-%E7%BD%91%E7%BB%9C%E7%8E%AF%E5%A2%83-01-%E7%BD%91%E7%BB%9C%E5%BC%80%E5%8F%91%E7%8E%AF%E5%A2%83%E6%90%AD%E5%BB%BA/img/image-20230717201524314.png">
<meta property="og:image" content="https://fanhua-picture.oss-cn-hangzhou.aliyuncs.com/01%E5%B5%8C%E5%85%A5%E5%BC%8F%E5%BC%80%E5%8F%91/02IMX6ULL%E5%B9%B3%E5%8F%B0/LV02-%E5%BC%80%E5%8F%91%E7%8E%AF%E5%A2%83/LV02-03-%E7%BD%91%E7%BB%9C%E7%8E%AF%E5%A2%83-01-%E7%BD%91%E7%BB%9C%E5%BC%80%E5%8F%91%E7%8E%AF%E5%A2%83%E6%90%AD%E5%BB%BA/img/image-20230717201739190.png">
<meta property="og:image" content="https://fanhua-picture.oss-cn-hangzhou.aliyuncs.com/01%E5%B5%8C%E5%85%A5%E5%BC%8F%E5%BC%80%E5%8F%91/02IMX6ULL%E5%B9%B3%E5%8F%B0/LV02-%E5%BC%80%E5%8F%91%E7%8E%AF%E5%A2%83/LV02-03-%E7%BD%91%E7%BB%9C%E7%8E%AF%E5%A2%83-01-%E7%BD%91%E7%BB%9C%E5%BC%80%E5%8F%91%E7%8E%AF%E5%A2%83%E6%90%AD%E5%BB%BA/img/image-20230717201926055.png">
<meta property="og:image" content="https://fanhua-picture.oss-cn-hangzhou.aliyuncs.com/01%E5%B5%8C%E5%85%A5%E5%BC%8F%E5%BC%80%E5%8F%91/02IMX6ULL%E5%B9%B3%E5%8F%B0/LV02-%E5%BC%80%E5%8F%91%E7%8E%AF%E5%A2%83/LV02-03-%E7%BD%91%E7%BB%9C%E7%8E%AF%E5%A2%83-01-%E7%BD%91%E7%BB%9C%E5%BC%80%E5%8F%91%E7%8E%AF%E5%A2%83%E6%90%AD%E5%BB%BA/img/image-20230717202053859.png">
<meta property="og:image" content="https://fanhua-picture.oss-cn-hangzhou.aliyuncs.com/01%E5%B5%8C%E5%85%A5%E5%BC%8F%E5%BC%80%E5%8F%91/02IMX6ULL%E5%B9%B3%E5%8F%B0/LV02-%E5%BC%80%E5%8F%91%E7%8E%AF%E5%A2%83/LV02-03-%E7%BD%91%E7%BB%9C%E7%8E%AF%E5%A2%83-01-%E7%BD%91%E7%BB%9C%E5%BC%80%E5%8F%91%E7%8E%AF%E5%A2%83%E6%90%AD%E5%BB%BA/img/image-20230717193548726.png">
<meta property="og:image" content="https://fanhua-picture.oss-cn-hangzhou.aliyuncs.com/01%E5%B5%8C%E5%85%A5%E5%BC%8F%E5%BC%80%E5%8F%91/02IMX6ULL%E5%B9%B3%E5%8F%B0/LV02-%E5%BC%80%E5%8F%91%E7%8E%AF%E5%A2%83/LV02-03-%E7%BD%91%E7%BB%9C%E7%8E%AF%E5%A2%83-01-%E7%BD%91%E7%BB%9C%E5%BC%80%E5%8F%91%E7%8E%AF%E5%A2%83%E6%90%AD%E5%BB%BA/img/image-20230717194222879.png">
<meta property="og:image" content="https://fanhua-picture.oss-cn-hangzhou.aliyuncs.com/01%E5%B5%8C%E5%85%A5%E5%BC%8F%E5%BC%80%E5%8F%91/02IMX6ULL%E5%B9%B3%E5%8F%B0/LV02-%E5%BC%80%E5%8F%91%E7%8E%AF%E5%A2%83/LV02-03-%E7%BD%91%E7%BB%9C%E7%8E%AF%E5%A2%83-01-%E7%BD%91%E7%BB%9C%E5%BC%80%E5%8F%91%E7%8E%AF%E5%A2%83%E6%90%AD%E5%BB%BA/img/image-20230717194406670.png">
<meta property="og:image" content="https://fanhua-picture.oss-cn-hangzhou.aliyuncs.com/01%E5%B5%8C%E5%85%A5%E5%BC%8F%E5%BC%80%E5%8F%91/02IMX6ULL%E5%B9%B3%E5%8F%B0/LV02-%E5%BC%80%E5%8F%91%E7%8E%AF%E5%A2%83/LV02-03-%E7%BD%91%E7%BB%9C%E7%8E%AF%E5%A2%83-01-%E7%BD%91%E7%BB%9C%E5%BC%80%E5%8F%91%E7%8E%AF%E5%A2%83%E6%90%AD%E5%BB%BA/img/image-20230717194520886.png">
<meta property="og:image" content="https://fanhua-picture.oss-cn-hangzhou.aliyuncs.com/01%E5%B5%8C%E5%85%A5%E5%BC%8F%E5%BC%80%E5%8F%91/02IMX6ULL%E5%B9%B3%E5%8F%B0/LV02-%E5%BC%80%E5%8F%91%E7%8E%AF%E5%A2%83/LV02-03-%E7%BD%91%E7%BB%9C%E7%8E%AF%E5%A2%83-01-%E7%BD%91%E7%BB%9C%E5%BC%80%E5%8F%91%E7%8E%AF%E5%A2%83%E6%90%AD%E5%BB%BA/img/image-20220718212321708.png">
<meta property="og:image" content="https://fanhua-picture.oss-cn-hangzhou.aliyuncs.com/01%E5%B5%8C%E5%85%A5%E5%BC%8F%E5%BC%80%E5%8F%91/02IMX6ULL%E5%B9%B3%E5%8F%B0/LV02-%E5%BC%80%E5%8F%91%E7%8E%AF%E5%A2%83/LV02-03-%E7%BD%91%E7%BB%9C%E7%8E%AF%E5%A2%83-01-%E7%BD%91%E7%BB%9C%E5%BC%80%E5%8F%91%E7%8E%AF%E5%A2%83%E6%90%AD%E5%BB%BA/img/image-20230717194823424.png">
<meta property="og:image" content="https://fanhua-picture.oss-cn-hangzhou.aliyuncs.com/01%E5%B5%8C%E5%85%A5%E5%BC%8F%E5%BC%80%E5%8F%91/02IMX6ULL%E5%B9%B3%E5%8F%B0/LV02-%E5%BC%80%E5%8F%91%E7%8E%AF%E5%A2%83/LV02-03-%E7%BD%91%E7%BB%9C%E7%8E%AF%E5%A2%83-01-%E7%BD%91%E7%BB%9C%E5%BC%80%E5%8F%91%E7%8E%AF%E5%A2%83%E6%90%AD%E5%BB%BA/img/image-20230717195039946.png">
<meta property="og:image" content="https://fanhua-picture.oss-cn-hangzhou.aliyuncs.com/01%E5%B5%8C%E5%85%A5%E5%BC%8F%E5%BC%80%E5%8F%91/02IMX6ULL%E5%B9%B3%E5%8F%B0/LV02-%E5%BC%80%E5%8F%91%E7%8E%AF%E5%A2%83/LV02-03-%E7%BD%91%E7%BB%9C%E7%8E%AF%E5%A2%83-01-%E7%BD%91%E7%BB%9C%E5%BC%80%E5%8F%91%E7%8E%AF%E5%A2%83%E6%90%AD%E5%BB%BA/img/image-20230717205606627.png">
<meta property="og:image" content="https://fanhua-picture.oss-cn-hangzhou.aliyuncs.com/01%E5%B5%8C%E5%85%A5%E5%BC%8F%E5%BC%80%E5%8F%91/02IMX6ULL%E5%B9%B3%E5%8F%B0/LV02-%E5%BC%80%E5%8F%91%E7%8E%AF%E5%A2%83/LV02-03-%E7%BD%91%E7%BB%9C%E7%8E%AF%E5%A2%83-01-%E7%BD%91%E7%BB%9C%E5%BC%80%E5%8F%91%E7%8E%AF%E5%A2%83%E6%90%AD%E5%BB%BA/img/image-20220718213457711.png">
<meta property="og:image" content="https://fanhua-picture.oss-cn-hangzhou.aliyuncs.com/01%E5%B5%8C%E5%85%A5%E5%BC%8F%E5%BC%80%E5%8F%91/02IMX6ULL%E5%B9%B3%E5%8F%B0/LV02-%E5%BC%80%E5%8F%91%E7%8E%AF%E5%A2%83/LV02-03-%E7%BD%91%E7%BB%9C%E7%8E%AF%E5%A2%83-01-%E7%BD%91%E7%BB%9C%E5%BC%80%E5%8F%91%E7%8E%AF%E5%A2%83%E6%90%AD%E5%BB%BA/img/image-20230717210414281.png">
<meta property="og:image" content="https://fanhua-picture.oss-cn-hangzhou.aliyuncs.com/01%E5%B5%8C%E5%85%A5%E5%BC%8F%E5%BC%80%E5%8F%91/02IMX6ULL%E5%B9%B3%E5%8F%B0/LV02-%E5%BC%80%E5%8F%91%E7%8E%AF%E5%A2%83/LV02-03-%E7%BD%91%E7%BB%9C%E7%8E%AF%E5%A2%83-01-%E7%BD%91%E7%BB%9C%E5%BC%80%E5%8F%91%E7%8E%AF%E5%A2%83%E6%90%AD%E5%BB%BA/img/image-20230717210655203.png">
<meta property="og:image" content="https://fanhua-picture.oss-cn-hangzhou.aliyuncs.com/01%E5%B5%8C%E5%85%A5%E5%BC%8F%E5%BC%80%E5%8F%91/02IMX6ULL%E5%B9%B3%E5%8F%B0/LV02-%E5%BC%80%E5%8F%91%E7%8E%AF%E5%A2%83/LV02-03-%E7%BD%91%E7%BB%9C%E7%8E%AF%E5%A2%83-01-%E7%BD%91%E7%BB%9C%E5%BC%80%E5%8F%91%E7%8E%AF%E5%A2%83%E6%90%AD%E5%BB%BA/img/image-20230717211308890.png">
<meta property="og:image" content="https://fanhua-picture.oss-cn-hangzhou.aliyuncs.com/01%E5%B5%8C%E5%85%A5%E5%BC%8F%E5%BC%80%E5%8F%91/02IMX6ULL%E5%B9%B3%E5%8F%B0/LV02-%E5%BC%80%E5%8F%91%E7%8E%AF%E5%A2%83/LV02-03-%E7%BD%91%E7%BB%9C%E7%8E%AF%E5%A2%83-01-%E7%BD%91%E7%BB%9C%E5%BC%80%E5%8F%91%E7%8E%AF%E5%A2%83%E6%90%AD%E5%BB%BA/img/image-20230717211405617.png">
<meta property="og:image" content="https://fanhua-picture.oss-cn-hangzhou.aliyuncs.com/01%E5%B5%8C%E5%85%A5%E5%BC%8F%E5%BC%80%E5%8F%91/02IMX6ULL%E5%B9%B3%E5%8F%B0/LV02-%E5%BC%80%E5%8F%91%E7%8E%AF%E5%A2%83/LV02-03-%E7%BD%91%E7%BB%9C%E7%8E%AF%E5%A2%83-01-%E7%BD%91%E7%BB%9C%E5%BC%80%E5%8F%91%E7%8E%AF%E5%A2%83%E6%90%AD%E5%BB%BA/img/image-20230717211938008.png">
<meta property="og:image" content="https://sumumm.github.io/post/https://fanhua-picture.oss-cn-hangzhou.aliyuncs.com/01%E5%B5%8C%E5%85%A5%E5%BC%8F%E5%BC%80%E5%8F%91/02IMX6ULL%E5%B9%B3%E5%8F%B0/LV02-%E5%BC%80%E5%8F%91%E7%8E%AF%E5%A2%83/LV02-03-%E7%BD%91%E7%BB%9C%E7%8E%AF%E5%A2%83-01-%E7%BD%91%E7%BB%9C%E5%BC%80%E5%8F%91%E7%8E%AF%E5%A2%83%E6%90%AD%E5%BB%BA/img/image-20240917090509002.png">
<meta property="og:image" content="https://fanhua-picture.oss-cn-hangzhou.aliyuncs.com/01%E5%B5%8C%E5%85%A5%E5%BC%8F%E5%BC%80%E5%8F%91/02IMX6ULL%E5%B9%B3%E5%8F%B0/LV02-%E5%BC%80%E5%8F%91%E7%8E%AF%E5%A2%83/LV02-03-%E7%BD%91%E7%BB%9C%E7%8E%AF%E5%A2%83-01-%E7%BD%91%E7%BB%9C%E5%BC%80%E5%8F%91%E7%8E%AF%E5%A2%83%E6%90%AD%E5%BB%BA/img/image-20230717213127776.png">
<meta property="og:image" content="https://fanhua-picture.oss-cn-hangzhou.aliyuncs.com/01%E5%B5%8C%E5%85%A5%E5%BC%8F%E5%BC%80%E5%8F%91/02IMX6ULL%E5%B9%B3%E5%8F%B0/LV02-%E5%BC%80%E5%8F%91%E7%8E%AF%E5%A2%83/LV02-03-%E7%BD%91%E7%BB%9C%E7%8E%AF%E5%A2%83-01-%E7%BD%91%E7%BB%9C%E5%BC%80%E5%8F%91%E7%8E%AF%E5%A2%83%E6%90%AD%E5%BB%BA/img/image-20230717213312843.png">
<meta property="og:image" content="https://fanhua-picture.oss-cn-hangzhou.aliyuncs.com/01%E5%B5%8C%E5%85%A5%E5%BC%8F%E5%BC%80%E5%8F%91/02IMX6ULL%E5%B9%B3%E5%8F%B0/LV02-%E5%BC%80%E5%8F%91%E7%8E%AF%E5%A2%83/LV02-03-%E7%BD%91%E7%BB%9C%E7%8E%AF%E5%A2%83-01-%E7%BD%91%E7%BB%9C%E5%BC%80%E5%8F%91%E7%8E%AF%E5%A2%83%E6%90%AD%E5%BB%BA/img/image-20230717213629661.png">
<meta property="og:image" content="https://fanhua-picture.oss-cn-hangzhou.aliyuncs.com/01%E5%B5%8C%E5%85%A5%E5%BC%8F%E5%BC%80%E5%8F%91/02IMX6ULL%E5%B9%B3%E5%8F%B0/LV02-%E5%BC%80%E5%8F%91%E7%8E%AF%E5%A2%83/LV02-03-%E7%BD%91%E7%BB%9C%E7%8E%AF%E5%A2%83-01-%E7%BD%91%E7%BB%9C%E5%BC%80%E5%8F%91%E7%8E%AF%E5%A2%83%E6%90%AD%E5%BB%BA/img/image-20230717214627540.png">
<meta property="og:image" content="https://fanhua-picture.oss-cn-hangzhou.aliyuncs.com/01%E5%B5%8C%E5%85%A5%E5%BC%8F%E5%BC%80%E5%8F%91/02IMX6ULL%E5%B9%B3%E5%8F%B0/LV02-%E5%BC%80%E5%8F%91%E7%8E%AF%E5%A2%83/LV02-03-%E7%BD%91%E7%BB%9C%E7%8E%AF%E5%A2%83-01-%E7%BD%91%E7%BB%9C%E5%BC%80%E5%8F%91%E7%8E%AF%E5%A2%83%E6%90%AD%E5%BB%BA/img/image-20230717214820330.png">
<meta property="og:image" content="https://fanhua-picture.oss-cn-hangzhou.aliyuncs.com/01%E5%B5%8C%E5%85%A5%E5%BC%8F%E5%BC%80%E5%8F%91/02IMX6ULL%E5%B9%B3%E5%8F%B0/LV02-%E5%BC%80%E5%8F%91%E7%8E%AF%E5%A2%83/LV02-03-%E7%BD%91%E7%BB%9C%E7%8E%AF%E5%A2%83-01-%E7%BD%91%E7%BB%9C%E5%BC%80%E5%8F%91%E7%8E%AF%E5%A2%83%E6%90%AD%E5%BB%BA/img/image-20230717215017684.png">
<meta property="og:image" content="https://fanhua-picture.oss-cn-hangzhou.aliyuncs.com/01%E5%B5%8C%E5%85%A5%E5%BC%8F%E5%BC%80%E5%8F%91/02IMX6ULL%E5%B9%B3%E5%8F%B0/LV02-%E5%BC%80%E5%8F%91%E7%8E%AF%E5%A2%83/LV02-03-%E7%BD%91%E7%BB%9C%E7%8E%AF%E5%A2%83-01-%E7%BD%91%E7%BB%9C%E5%BC%80%E5%8F%91%E7%8E%AF%E5%A2%83%E6%90%AD%E5%BB%BA/img/image-20230717215137728.png">
<meta property="og:image" content="https://fanhua-picture.oss-cn-hangzhou.aliyuncs.com/01%E5%B5%8C%E5%85%A5%E5%BC%8F%E5%BC%80%E5%8F%91/02IMX6ULL%E5%B9%B3%E5%8F%B0/LV02-%E5%BC%80%E5%8F%91%E7%8E%AF%E5%A2%83/LV02-03-%E7%BD%91%E7%BB%9C%E7%8E%AF%E5%A2%83-01-%E7%BD%91%E7%BB%9C%E5%BC%80%E5%8F%91%E7%8E%AF%E5%A2%83%E6%90%AD%E5%BB%BA/img/image-20230718225201521.png">
<meta property="og:image" content="https://fanhua-picture.oss-cn-hangzhou.aliyuncs.com/01%E5%B5%8C%E5%85%A5%E5%BC%8F%E5%BC%80%E5%8F%91/02IMX6ULL%E5%B9%B3%E5%8F%B0/LV02-%E5%BC%80%E5%8F%91%E7%8E%AF%E5%A2%83/LV02-03-%E7%BD%91%E7%BB%9C%E7%8E%AF%E5%A2%83-01-%E7%BD%91%E7%BB%9C%E5%BC%80%E5%8F%91%E7%8E%AF%E5%A2%83%E6%90%AD%E5%BB%BA/img/image-20230718224810377.png">
<meta property="og:image" content="https://fanhua-picture.oss-cn-hangzhou.aliyuncs.com/01%E5%B5%8C%E5%85%A5%E5%BC%8F%E5%BC%80%E5%8F%91/02IMX6ULL%E5%B9%B3%E5%8F%B0/LV02-%E5%BC%80%E5%8F%91%E7%8E%AF%E5%A2%83/LV02-03-%E7%BD%91%E7%BB%9C%E7%8E%AF%E5%A2%83-01-%E7%BD%91%E7%BB%9C%E5%BC%80%E5%8F%91%E7%8E%AF%E5%A2%83%E6%90%AD%E5%BB%BA/img/image-20230717215424090.png">
<meta property="og:image" content="https://fanhua-picture.oss-cn-hangzhou.aliyuncs.com/01%E5%B5%8C%E5%85%A5%E5%BC%8F%E5%BC%80%E5%8F%91/02IMX6ULL%E5%B9%B3%E5%8F%B0/LV02-%E5%BC%80%E5%8F%91%E7%8E%AF%E5%A2%83/LV02-03-%E7%BD%91%E7%BB%9C%E7%8E%AF%E5%A2%83-01-%E7%BD%91%E7%BB%9C%E5%BC%80%E5%8F%91%E7%8E%AF%E5%A2%83%E6%90%AD%E5%BB%BA/img/image-20240426074115263.png">
<meta property="og:image" content="https://fanhua-picture.oss-cn-hangzhou.aliyuncs.com/01%E5%B5%8C%E5%85%A5%E5%BC%8F%E5%BC%80%E5%8F%91/02IMX6ULL%E5%B9%B3%E5%8F%B0/LV02-%E5%BC%80%E5%8F%91%E7%8E%AF%E5%A2%83/LV02-03-%E7%BD%91%E7%BB%9C%E7%8E%AF%E5%A2%83-01-%E7%BD%91%E7%BB%9C%E5%BC%80%E5%8F%91%E7%8E%AF%E5%A2%83%E6%90%AD%E5%BB%BA/img/image-20240426074345579.png">
<meta property="og:image" content="https://fanhua-picture.oss-cn-hangzhou.aliyuncs.com/01%E5%B5%8C%E5%85%A5%E5%BC%8F%E5%BC%80%E5%8F%91/02IMX6ULL%E5%B9%B3%E5%8F%B0/LV02-%E5%BC%80%E5%8F%91%E7%8E%AF%E5%A2%83/LV02-03-%E7%BD%91%E7%BB%9C%E7%8E%AF%E5%A2%83-01-%E7%BD%91%E7%BB%9C%E5%BC%80%E5%8F%91%E7%8E%AF%E5%A2%83%E6%90%AD%E5%BB%BA/img/image-20220719073057553.png">
<meta property="og:image" content="https://fanhua-picture.oss-cn-hangzhou.aliyuncs.com/01%E5%B5%8C%E5%85%A5%E5%BC%8F%E5%BC%80%E5%8F%91/02IMX6ULL%E5%B9%B3%E5%8F%B0/LV02-%E5%BC%80%E5%8F%91%E7%8E%AF%E5%A2%83/LV02-03-%E7%BD%91%E7%BB%9C%E7%8E%AF%E5%A2%83-01-%E7%BD%91%E7%BB%9C%E5%BC%80%E5%8F%91%E7%8E%AF%E5%A2%83%E6%90%AD%E5%BB%BA/img/image-20240917092842253.png">
<meta property="og:image" content="https://fanhua-picture.oss-cn-hangzhou.aliyuncs.com/01%E5%B5%8C%E5%85%A5%E5%BC%8F%E5%BC%80%E5%8F%91/02IMX6ULL%E5%B9%B3%E5%8F%B0/LV02-%E5%BC%80%E5%8F%91%E7%8E%AF%E5%A2%83/LV02-03-%E7%BD%91%E7%BB%9C%E7%8E%AF%E5%A2%83-01-%E7%BD%91%E7%BB%9C%E5%BC%80%E5%8F%91%E7%8E%AF%E5%A2%83%E6%90%AD%E5%BB%BA/img/image-20240917093004239.png">
<meta property="og:image" content="https://fanhua-picture.oss-cn-hangzhou.aliyuncs.com/01%E5%B5%8C%E5%85%A5%E5%BC%8F%E5%BC%80%E5%8F%91/02IMX6ULL%E5%B9%B3%E5%8F%B0/LV02-%E5%BC%80%E5%8F%91%E7%8E%AF%E5%A2%83/LV02-03-%E7%BD%91%E7%BB%9C%E7%8E%AF%E5%A2%83-01-%E7%BD%91%E7%BB%9C%E5%BC%80%E5%8F%91%E7%8E%AF%E5%A2%83%E6%90%AD%E5%BB%BA/img/image-20240828070429692.png">
<meta property="og:image" content="https://fanhua-picture.oss-cn-hangzhou.aliyuncs.com/01%E5%B5%8C%E5%85%A5%E5%BC%8F%E5%BC%80%E5%8F%91/02IMX6ULL%E5%B9%B3%E5%8F%B0/LV02-%E5%BC%80%E5%8F%91%E7%8E%AF%E5%A2%83/LV02-03-%E7%BD%91%E7%BB%9C%E7%8E%AF%E5%A2%83-01-%E7%BD%91%E7%BB%9C%E5%BC%80%E5%8F%91%E7%8E%AF%E5%A2%83%E6%90%AD%E5%BB%BA/img/image-20240828070510372.png">
<meta property="og:image" content="https://fanhua-picture.oss-cn-hangzhou.aliyuncs.com/01%E5%B5%8C%E5%85%A5%E5%BC%8F%E5%BC%80%E5%8F%91/02IMX6ULL%E5%B9%B3%E5%8F%B0/LV02-%E5%BC%80%E5%8F%91%E7%8E%AF%E5%A2%83/LV02-03-%E7%BD%91%E7%BB%9C%E7%8E%AF%E5%A2%83-01-%E7%BD%91%E7%BB%9C%E5%BC%80%E5%8F%91%E7%8E%AF%E5%A2%83%E6%90%AD%E5%BB%BA/img/image-20240828070527686.png">
<meta property="og:image" content="https://fanhua-picture.oss-cn-hangzhou.aliyuncs.com/01%E5%B5%8C%E5%85%A5%E5%BC%8F%E5%BC%80%E5%8F%91/02IMX6ULL%E5%B9%B3%E5%8F%B0/LV02-%E5%BC%80%E5%8F%91%E7%8E%AF%E5%A2%83/LV02-03-%E7%BD%91%E7%BB%9C%E7%8E%AF%E5%A2%83-01-%E7%BD%91%E7%BB%9C%E5%BC%80%E5%8F%91%E7%8E%AF%E5%A2%83%E6%90%AD%E5%BB%BA/img/image-20240828070604492.png">
<meta property="og:image" content="https://fanhua-picture.oss-cn-hangzhou.aliyuncs.com/01%E5%B5%8C%E5%85%A5%E5%BC%8F%E5%BC%80%E5%8F%91/02IMX6ULL%E5%B9%B3%E5%8F%B0/LV02-%E5%BC%80%E5%8F%91%E7%8E%AF%E5%A2%83/LV02-03-%E7%BD%91%E7%BB%9C%E7%8E%AF%E5%A2%83-01-%E7%BD%91%E7%BB%9C%E5%BC%80%E5%8F%91%E7%8E%AF%E5%A2%83%E6%90%AD%E5%BB%BA/img/image-20240828070630227.png">
<meta property="og:image" content="https://fanhua-picture.oss-cn-hangzhou.aliyuncs.com/01%E5%B5%8C%E5%85%A5%E5%BC%8F%E5%BC%80%E5%8F%91/02IMX6ULL%E5%B9%B3%E5%8F%B0/LV02-%E5%BC%80%E5%8F%91%E7%8E%AF%E5%A2%83/LV02-03-%E7%BD%91%E7%BB%9C%E7%8E%AF%E5%A2%83-01-%E7%BD%91%E7%BB%9C%E5%BC%80%E5%8F%91%E7%8E%AF%E5%A2%83%E6%90%AD%E5%BB%BA/img/image-20240828070652598.png">
<meta property="og:image" content="https://fanhua-picture.oss-cn-hangzhou.aliyuncs.com/01%E5%B5%8C%E5%85%A5%E5%BC%8F%E5%BC%80%E5%8F%91/02IMX6ULL%E5%B9%B3%E5%8F%B0/LV02-%E5%BC%80%E5%8F%91%E7%8E%AF%E5%A2%83/LV02-03-%E7%BD%91%E7%BB%9C%E7%8E%AF%E5%A2%83-01-%E7%BD%91%E7%BB%9C%E5%BC%80%E5%8F%91%E7%8E%AF%E5%A2%83%E6%90%AD%E5%BB%BA/img/image-20240828070716645.png">
<meta property="og:image" content="https://fanhua-picture.oss-cn-hangzhou.aliyuncs.com/01%E5%B5%8C%E5%85%A5%E5%BC%8F%E5%BC%80%E5%8F%91/02IMX6ULL%E5%B9%B3%E5%8F%B0/LV02-%E5%BC%80%E5%8F%91%E7%8E%AF%E5%A2%83/LV02-03-%E7%BD%91%E7%BB%9C%E7%8E%AF%E5%A2%83-01-%E7%BD%91%E7%BB%9C%E5%BC%80%E5%8F%91%E7%8E%AF%E5%A2%83%E6%90%AD%E5%BB%BA/img/image-20240828071548778.png">
<meta property="og:image" content="https://fanhua-picture.oss-cn-hangzhou.aliyuncs.com/01%E5%B5%8C%E5%85%A5%E5%BC%8F%E5%BC%80%E5%8F%91/02IMX6ULL%E5%B9%B3%E5%8F%B0/LV02-%E5%BC%80%E5%8F%91%E7%8E%AF%E5%A2%83/LV02-03-%E7%BD%91%E7%BB%9C%E7%8E%AF%E5%A2%83-01-%E7%BD%91%E7%BB%9C%E5%BC%80%E5%8F%91%E7%8E%AF%E5%A2%83%E6%90%AD%E5%BB%BA/img/image-20240828071611285.png">
<meta property="og:image" content="https://fanhua-picture.oss-cn-hangzhou.aliyuncs.com/01%E5%B5%8C%E5%85%A5%E5%BC%8F%E5%BC%80%E5%8F%91/02IMX6ULL%E5%B9%B3%E5%8F%B0/LV02-%E5%BC%80%E5%8F%91%E7%8E%AF%E5%A2%83/LV02-03-%E7%BD%91%E7%BB%9C%E7%8E%AF%E5%A2%83-01-%E7%BD%91%E7%BB%9C%E5%BC%80%E5%8F%91%E7%8E%AF%E5%A2%83%E6%90%AD%E5%BB%BA/img/image-20240828071652401.png">
<meta property="og:image" content="https://fanhua-picture.oss-cn-hangzhou.aliyuncs.com/01%E5%B5%8C%E5%85%A5%E5%BC%8F%E5%BC%80%E5%8F%91/02IMX6ULL%E5%B9%B3%E5%8F%B0/LV02-%E5%BC%80%E5%8F%91%E7%8E%AF%E5%A2%83/LV02-03-%E7%BD%91%E7%BB%9C%E7%8E%AF%E5%A2%83-01-%E7%BD%91%E7%BB%9C%E5%BC%80%E5%8F%91%E7%8E%AF%E5%A2%83%E6%90%AD%E5%BB%BA/img/image-20240828071824556.png">
<meta property="og:image" content="https://fanhua-picture.oss-cn-hangzhou.aliyuncs.com/01%E5%B5%8C%E5%85%A5%E5%BC%8F%E5%BC%80%E5%8F%91/02IMX6ULL%E5%B9%B3%E5%8F%B0/LV02-%E5%BC%80%E5%8F%91%E7%8E%AF%E5%A2%83/LV02-03-%E7%BD%91%E7%BB%9C%E7%8E%AF%E5%A2%83-01-%E7%BD%91%E7%BB%9C%E5%BC%80%E5%8F%91%E7%8E%AF%E5%A2%83%E6%90%AD%E5%BB%BA/img/image-20240828071911422.png">
<meta property="og:image" content="https://fanhua-picture.oss-cn-hangzhou.aliyuncs.com/01%E5%B5%8C%E5%85%A5%E5%BC%8F%E5%BC%80%E5%8F%91/02IMX6ULL%E5%B9%B3%E5%8F%B0/LV02-%E5%BC%80%E5%8F%91%E7%8E%AF%E5%A2%83/LV02-03-%E7%BD%91%E7%BB%9C%E7%8E%AF%E5%A2%83-01-%E7%BD%91%E7%BB%9C%E5%BC%80%E5%8F%91%E7%8E%AF%E5%A2%83%E6%90%AD%E5%BB%BA/img/image-20240828071948345.png">
<meta property="og:image" content="https://fanhua-picture.oss-cn-hangzhou.aliyuncs.com/01%E5%B5%8C%E5%85%A5%E5%BC%8F%E5%BC%80%E5%8F%91/02IMX6ULL%E5%B9%B3%E5%8F%B0/LV02-%E5%BC%80%E5%8F%91%E7%8E%AF%E5%A2%83/LV02-03-%E7%BD%91%E7%BB%9C%E7%8E%AF%E5%A2%83-01-%E7%BD%91%E7%BB%9C%E5%BC%80%E5%8F%91%E7%8E%AF%E5%A2%83%E6%90%AD%E5%BB%BA/img/image-20240828072053284.png">
<meta property="og:image" content="https://fanhua-picture.oss-cn-hangzhou.aliyuncs.com/01%E5%B5%8C%E5%85%A5%E5%BC%8F%E5%BC%80%E5%8F%91/02IMX6ULL%E5%B9%B3%E5%8F%B0/LV02-%E5%BC%80%E5%8F%91%E7%8E%AF%E5%A2%83/LV02-03-%E7%BD%91%E7%BB%9C%E7%8E%AF%E5%A2%83-01-%E7%BD%91%E7%BB%9C%E5%BC%80%E5%8F%91%E7%8E%AF%E5%A2%83%E6%90%AD%E5%BB%BA/img/image-20240828072145728.png">
<meta property="og:image" content="https://fanhua-picture.oss-cn-hangzhou.aliyuncs.com/01%E5%B5%8C%E5%85%A5%E5%BC%8F%E5%BC%80%E5%8F%91/02IMX6ULL%E5%B9%B3%E5%8F%B0/LV02-%E5%BC%80%E5%8F%91%E7%8E%AF%E5%A2%83/LV02-03-%E7%BD%91%E7%BB%9C%E7%8E%AF%E5%A2%83-01-%E7%BD%91%E7%BB%9C%E5%BC%80%E5%8F%91%E7%8E%AF%E5%A2%83%E6%90%AD%E5%BB%BA/img/image-20240828072223732.png">
<meta property="og:image" content="https://fanhua-picture.oss-cn-hangzhou.aliyuncs.com/01%E5%B5%8C%E5%85%A5%E5%BC%8F%E5%BC%80%E5%8F%91/02IMX6ULL%E5%B9%B3%E5%8F%B0/LV02-%E5%BC%80%E5%8F%91%E7%8E%AF%E5%A2%83/LV02-03-%E7%BD%91%E7%BB%9C%E7%8E%AF%E5%A2%83-01-%E7%BD%91%E7%BB%9C%E5%BC%80%E5%8F%91%E7%8E%AF%E5%A2%83%E6%90%AD%E5%BB%BA/img/image-20240828072502998.png">
<meta property="og:image" content="https://fanhua-picture.oss-cn-hangzhou.aliyuncs.com/01%E5%B5%8C%E5%85%A5%E5%BC%8F%E5%BC%80%E5%8F%91/02IMX6ULL%E5%B9%B3%E5%8F%B0/LV02-%E5%BC%80%E5%8F%91%E7%8E%AF%E5%A2%83/LV02-03-%E7%BD%91%E7%BB%9C%E7%8E%AF%E5%A2%83-01-%E7%BD%91%E7%BB%9C%E5%BC%80%E5%8F%91%E7%8E%AF%E5%A2%83%E6%90%AD%E5%BB%BA/img/image-20240828073323651.png">
<meta property="og:image" content="https://fanhua-picture.oss-cn-hangzhou.aliyuncs.com/01%E5%B5%8C%E5%85%A5%E5%BC%8F%E5%BC%80%E5%8F%91/02IMX6ULL%E5%B9%B3%E5%8F%B0/LV02-%E5%BC%80%E5%8F%91%E7%8E%AF%E5%A2%83/LV02-03-%E7%BD%91%E7%BB%9C%E7%8E%AF%E5%A2%83-01-%E7%BD%91%E7%BB%9C%E5%BC%80%E5%8F%91%E7%8E%AF%E5%A2%83%E6%90%AD%E5%BB%BA/img/image-20240828073414246.png">
<meta property="og:image" content="https://fanhua-picture.oss-cn-hangzhou.aliyuncs.com/01%E5%B5%8C%E5%85%A5%E5%BC%8F%E5%BC%80%E5%8F%91/02IMX6ULL%E5%B9%B3%E5%8F%B0/LV02-%E5%BC%80%E5%8F%91%E7%8E%AF%E5%A2%83/LV02-03-%E7%BD%91%E7%BB%9C%E7%8E%AF%E5%A2%83-01-%E7%BD%91%E7%BB%9C%E5%BC%80%E5%8F%91%E7%8E%AF%E5%A2%83%E6%90%AD%E5%BB%BA/img/image-20240828073438474.png">
<meta property="og:image" content="https://fanhua-picture.oss-cn-hangzhou.aliyuncs.com/01%E5%B5%8C%E5%85%A5%E5%BC%8F%E5%BC%80%E5%8F%91/02IMX6ULL%E5%B9%B3%E5%8F%B0/LV02-%E5%BC%80%E5%8F%91%E7%8E%AF%E5%A2%83/LV02-03-%E7%BD%91%E7%BB%9C%E7%8E%AF%E5%A2%83-01-%E7%BD%91%E7%BB%9C%E5%BC%80%E5%8F%91%E7%8E%AF%E5%A2%83%E6%90%AD%E5%BB%BA/img/image-20240828073536774.png">
<meta property="og:image" content="https://fanhua-picture.oss-cn-hangzhou.aliyuncs.com/01%E5%B5%8C%E5%85%A5%E5%BC%8F%E5%BC%80%E5%8F%91/02IMX6ULL%E5%B9%B3%E5%8F%B0/LV02-%E5%BC%80%E5%8F%91%E7%8E%AF%E5%A2%83/LV02-03-%E7%BD%91%E7%BB%9C%E7%8E%AF%E5%A2%83-01-%E7%BD%91%E7%BB%9C%E5%BC%80%E5%8F%91%E7%8E%AF%E5%A2%83%E6%90%AD%E5%BB%BA/img/image-20240828073618438.png">
<meta property="og:image" content="https://fanhua-picture.oss-cn-hangzhou.aliyuncs.com/01%E5%B5%8C%E5%85%A5%E5%BC%8F%E5%BC%80%E5%8F%91/02IMX6ULL%E5%B9%B3%E5%8F%B0/LV02-%E5%BC%80%E5%8F%91%E7%8E%AF%E5%A2%83/LV02-03-%E7%BD%91%E7%BB%9C%E7%8E%AF%E5%A2%83-01-%E7%BD%91%E7%BB%9C%E5%BC%80%E5%8F%91%E7%8E%AF%E5%A2%83%E6%90%AD%E5%BB%BA/img/image-20240828073633430.png">
<meta property="og:image" content="https://fanhua-picture.oss-cn-hangzhou.aliyuncs.com/01%E5%B5%8C%E5%85%A5%E5%BC%8F%E5%BC%80%E5%8F%91/02IMX6ULL%E5%B9%B3%E5%8F%B0/LV02-%E5%BC%80%E5%8F%91%E7%8E%AF%E5%A2%83/LV02-03-%E7%BD%91%E7%BB%9C%E7%8E%AF%E5%A2%83-01-%E7%BD%91%E7%BB%9C%E5%BC%80%E5%8F%91%E7%8E%AF%E5%A2%83%E6%90%AD%E5%BB%BA/img/image-20240828073653258.png">
<meta property="og:image" content="https://fanhua-picture.oss-cn-hangzhou.aliyuncs.com/01%E5%B5%8C%E5%85%A5%E5%BC%8F%E5%BC%80%E5%8F%91/02IMX6ULL%E5%B9%B3%E5%8F%B0/LV02-%E5%BC%80%E5%8F%91%E7%8E%AF%E5%A2%83/LV02-03-%E7%BD%91%E7%BB%9C%E7%8E%AF%E5%A2%83-01-%E7%BD%91%E7%BB%9C%E5%BC%80%E5%8F%91%E7%8E%AF%E5%A2%83%E6%90%AD%E5%BB%BA/img/image-20240828073726227.png">
<meta property="og:image" content="https://fanhua-picture.oss-cn-hangzhou.aliyuncs.com/01%E5%B5%8C%E5%85%A5%E5%BC%8F%E5%BC%80%E5%8F%91/02IMX6ULL%E5%B9%B3%E5%8F%B0/LV02-%E5%BC%80%E5%8F%91%E7%8E%AF%E5%A2%83/LV02-03-%E7%BD%91%E7%BB%9C%E7%8E%AF%E5%A2%83-01-%E7%BD%91%E7%BB%9C%E5%BC%80%E5%8F%91%E7%8E%AF%E5%A2%83%E6%90%AD%E5%BB%BA/img/image-20240828073749805.png">
<meta property="og:image" content="https://fanhua-picture.oss-cn-hangzhou.aliyuncs.com/01%E5%B5%8C%E5%85%A5%E5%BC%8F%E5%BC%80%E5%8F%91/02IMX6ULL%E5%B9%B3%E5%8F%B0/LV02-%E5%BC%80%E5%8F%91%E7%8E%AF%E5%A2%83/LV02-03-%E7%BD%91%E7%BB%9C%E7%8E%AF%E5%A2%83-01-%E7%BD%91%E7%BB%9C%E5%BC%80%E5%8F%91%E7%8E%AF%E5%A2%83%E6%90%AD%E5%BB%BA/img/image-20240828073835700.png">
<meta property="article:published_time" content="2023-09-08T11:24:50.000Z">
<meta property="article:modified_time" content="2025-06-13T16:25:57.033Z">
<meta property="article:author" content="苏木">
<meta property="article:tag" content="(ALPHA)LV02-开发环境">
<meta name="twitter:card" content="summary">
<meta name="twitter:image" content="https://fanhua-picture.oss-cn-hangzhou.aliyuncs.com/01%E5%B5%8C%E5%85%A5%E5%BC%8F%E5%BC%80%E5%8F%91/02IMX6ULL%E5%B9%B3%E5%8F%B0/LV02-%E5%BC%80%E5%8F%91%E7%8E%AF%E5%A2%83/LV02-03-%E7%BD%91%E7%BB%9C%E7%8E%AF%E5%A2%83-01-%E7%BD%91%E7%BB%9C%E5%BC%80%E5%8F%91%E7%8E%AF%E5%A2%83%E6%90%AD%E5%BB%BA/img/image-20230717200554402.png">


<link rel="canonical" href="https://sumumm.github.io/post/717d15a2.html">



<script class="next-config" data-name="page" type="application/json">{"sidebar":"","isHome":false,"isPost":true,"lang":"zh-CN","comments":true,"permalink":"https://sumumm.github.io/post/717d15a2.html","path":"post/717d15a2.html","title":"LV02-03-网络环境-01-网络开发环境搭建"}</script>

<script class="next-config" data-name="calendar" type="application/json">""</script>
<title>LV02-03-网络环境-01-网络开发环境搭建 | 苏木</title>
  








    <script src="/js/browser_tools_disable.js"></script>

  <noscript>
    <link rel="stylesheet" href="/css/noscript.css">
  </noscript>
<!-- hexo injector head_end start --><link rel="stylesheet" href="https://unpkg.com/hexo-next-tags-plus@latest/lib/tag_plus.css" media="defer" onload="this.media='all'"><!-- hexo injector head_end end --></head>

<body itemscope itemtype="http://schema.org/WebPage" class="use-motion">
  <div class="headband"></div>

  <main class="main">
    <div class="column">
      <header class="header" itemscope itemtype="http://schema.org/WPHeader"><div class="site-brand-container">
  <div class="site-nav-toggle">
    <div class="toggle" aria-label="切换导航栏" role="button">
        <span class="toggle-line"></span>
        <span class="toggle-line"></span>
        <span class="toggle-line"></span>
    </div>
  </div>

  <div class="site-meta">

    <a href="/" class="brand" rel="start">
      <i class="logo-line"></i>
      <p class="site-title">苏木</p>
      <i class="logo-line"></i>
    </a>
      <p class="site-subtitle" itemprop="description">我的学习之路</p>
  </div>

  <div class="site-nav-right">
    <div class="toggle popup-trigger" aria-label="搜索" role="button">
        <i class="fa fa-search fa-fw fa-lg"></i>
    </div>
  </div>
</div>



<nav class="site-nav">
  <ul class="main-menu menu"><li class="menu-item menu-item-home"><a href="/" rel="section"><i class="fa fa-home fa-fw"></i>苏木的家</a></li><li class="menu-item menu-item-categories"><a href="/categories/" rel="section"><i class="fa fa-th fa-fw"></i>分类页<span class="badge">42</span></a></li><li class="menu-item menu-item-archives"><a href="/archives/" rel="section"><i class="fa fa-archive fa-fw"></i>归档页<span class="badge">673</span></a></li><li class="menu-item menu-item-flink"><a href="/flink/" rel="section"><i class="fa fa-link fa-fw"></i>友人帐</a></li><li class="menu-item menu-item-about"><a href="/about/" rel="section"><i class="fa fa-user fa-fw"></i>关于我</a></li>
      <li class="menu-item menu-item-search">
        <a role="button" class="popup-trigger"><i class="fa fa-search fa-fw"></i>搜索
        </a>
      </li>
  </ul>
</nav>



  <div class="search-pop-overlay">
    <div class="popup search-popup"><div class="search-header">
  <span class="search-icon">
    <i class="fa fa-search"></i>
  </span>
  <div class="search-input-container">
    <input autocomplete="off" autocapitalize="off" maxlength="80"
           placeholder="搜索..." spellcheck="false"
           type="search" class="search-input">
  </div>
  <span class="popup-btn-close" role="button">
    <i class="fa fa-times-circle"></i>
  </span>
</div>
<div class="search-result-container no-result">
  <div class="search-result-icon">
    <i class="fa fa-spinner fa-pulse fa-5x"></i>
  </div>
</div>

    </div>
  </div>

</header>
        
  
  <aside class="sidebar">

    <div class="sidebar-inner sidebar-nav-active sidebar-toc-active">
      <ul class="sidebar-nav">
        <li class="sidebar-nav-toc">
          文章目录
        </li>
        <li class="sidebar-nav-overview">
          站点概览
        </li>
      </ul>

      <div class="sidebar-panel-container">
        <!--noindex-->
        <div class="post-toc-wrap sidebar-panel">
            <div class="post-toc animated"><ol class="nav"><li class="nav-item nav-level-1"><a class="nav-link" href="#%E4%B8%80%E3%80%81%E5%87%86%E5%A4%87%E5%B7%A5%E4%BD%9C"><span class="nav-text">一、准备工作</span></a><ol class="nav-child"><li class="nav-item nav-level-2"><a class="nav-link" href="#1-%E6%89%A9%E5%B1%95%E5%9D%9E"><span class="nav-text">1. 扩展坞</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#2-%E7%A1%AC%E4%BB%B6%E8%BF%9E%E6%8E%A5%E6%96%B9%E5%BC%8F"><span class="nav-text">2. 硬件连接方式</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#3-%E5%85%B3%E9%97%AD-Ubuntu-%E5%92%8C-Windows-%E9%98%B2%E7%81%AB%E5%A2%99"><span class="nav-text">3. 关闭 Ubuntu 和 Windows 防火墙  </span></a><ol class="nav-child"><li class="nav-item nav-level-3"><a class="nav-link" href="#3-1-Windows"><span class="nav-text">3.1 Windows</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#3-2-Ubuntu"><span class="nav-text">3.2 Ubuntu</span></a></li></ol></li></ol></li><li class="nav-item nav-level-1"><a class="nav-link" href="#%E4%BA%8C%E3%80%81%E7%94%B5%E8%84%91WiFi%E4%B8%8A%E7%BD%91%EF%BC%8C%E5%BC%80%E5%8F%91%E6%9D%BF%E5%92%8C%E7%94%B5%E8%84%91%E7%9B%B4%E8%BF%9E"><span class="nav-text">二、电脑WiFi上网，开发板和电脑直连 </span></a><ol class="nav-child"><li class="nav-item nav-level-2"><a class="nav-link" href="#1-windows%E9%85%8D%E7%BD%AE"><span class="nav-text">1. windows配置</span></a><ol class="nav-child"><li class="nav-item nav-level-3"><a class="nav-link" href="#1-1-%E6%9F%A5%E7%9C%8Bwindows%E4%B8%AD%E6%9C%89%E5%93%AA%E4%BA%9B%E7%BD%91%E7%BB%9C%E9%80%82%E9%85%8D%E5%99%A8"><span class="nav-text">1.1 查看windows中有哪些网络适配器</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#1-2-%E6%9F%A5%E7%9C%8B-windows-%E4%BB%A5%E5%A4%AA%E7%BD%91%E7%BD%91%E7%BB%9C%E9%80%82%E9%85%8D%E5%99%A8"><span class="nav-text">1.2 查看 windows 以太网网络适配器</span></a><ol class="nav-child"><li class="nav-item nav-level-4"><a class="nav-link" href="#1-2-1-%E6%96%B9%E5%BC%8F%E4%B8%80"><span class="nav-text">1.2.1 方式一</span></a></li><li class="nav-item nav-level-4"><a class="nav-link" href="#1-2-2-%E6%96%B9%E5%BC%8F%E4%BA%8C"><span class="nav-text">1.2.2 方式二</span></a></li></ol></li><li class="nav-item nav-level-3"><a class="nav-link" href="#1-3-%E8%AE%BE%E7%BD%AE%E7%BD%91%E5%8F%A3IP"><span class="nav-text">1.3 设置网口IP</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#1-4-%E6%9F%A5%E7%9C%8B-windows-%E4%B8%BB%E6%9C%BA%E6%89%80%E6%9C%89%E7%BD%91%E7%BB%9C%E4%BF%A1%E6%81%AF"><span class="nav-text">1.4 查看 windows 主机所有网络信息</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#1-5-windows-IP"><span class="nav-text">1.5 windows IP</span></a></li></ol></li><li class="nav-item nav-level-2"><a class="nav-link" href="#2-ubuntu%E9%85%8D%E7%BD%AE"><span class="nav-text">2. ubuntu配置</span></a><ol class="nav-child"><li class="nav-item nav-level-3"><a class="nav-link" href="#2-1-%E5%8F%8C%E7%BD%91%E5%8D%A1%EF%BC%9F"><span class="nav-text">2.1 双网卡？</span></a><ol class="nav-child"><li class="nav-item nav-level-4"><a class="nav-link" href="#2-1-1-NAT%E7%BD%91%E5%8D%A1"><span class="nav-text">2.1.1 NAT网卡</span></a></li><li class="nav-item nav-level-4"><a class="nav-link" href="#2-1-2-%E6%A1%A5%E6%8E%A5%E7%BD%91%E5%8D%A1"><span class="nav-text">2.1.2 桥接网卡</span></a></li><li class="nav-item nav-level-4"><a class="nav-link" href="#2-1-3-%E5%8F%8C%E7%BD%91%E5%8D%A1%E7%9A%84%E8%99%9A%E6%8B%9F%E6%9C%BA"><span class="nav-text">2.1.3 双网卡的虚拟机</span></a></li></ol></li><li class="nav-item nav-level-3"><a class="nav-link" href="#2-2-VMware%E6%A1%A5%E6%8E%A5%E7%BD%91%E7%BB%9C%E9%80%82%E9%85%8D%E5%99%A8"><span class="nav-text">2.2. VMware桥接网络适配器</span></a><ol class="nav-child"><li class="nav-item nav-level-4"><a class="nav-link" href="#2-2-1-%E6%96%B0%E5%BB%BA%E7%BD%91%E7%BB%9C%E9%80%82%E9%85%8D%E5%99%A8"><span class="nav-text">2.2.1 新建网络适配器</span></a></li><li class="nav-item nav-level-4"><a class="nav-link" href="#2-2-2-%E9%85%8D%E7%BD%AE%E8%99%9A%E6%8B%9F%E7%BD%91%E7%BB%9C%E7%BC%96%E8%BE%91%E5%99%A8"><span class="nav-text">2.2.2 配置虚拟网络编辑器</span></a></li><li class="nav-item nav-level-4"><a class="nav-link" href="#2-2-3-%E8%99%9A%E6%8B%9F%E7%BD%91%E5%8D%A1%E5%90%8D%E7%AE%80%E4%BB%8B"><span class="nav-text">2.2.3 虚拟网卡名简介</span></a></li><li class="nav-item nav-level-4"><a class="nav-link" href="#2-2-4-%E5%8F%AF%E8%83%BD%E5%87%BA%E7%8E%B0%E7%9A%84%E9%97%AE%E9%A2%98"><span class="nav-text">2.2.4 可能出现的问题</span></a><ol class="nav-child"><li class="nav-item nav-level-5"><a class="nav-link" href="#2-2-4-1-%E9%97%AE%E9%A2%98%E4%B8%80"><span class="nav-text">2.2.4.1 问题一</span></a></li><li class="nav-item nav-level-5"><a class="nav-link" href="#2-2-4-2-%E9%97%AE%E9%A2%98%E4%BA%8C"><span class="nav-text">2.2.4.2 问题二</span></a></li></ol></li></ol></li><li class="nav-item nav-level-3"><a class="nav-link" href="#2-3-ubuntu%E7%BD%91%E7%BB%9C%E9%85%8D%E7%BD%AE"><span class="nav-text">2.3 ubuntu网络配置</span></a><ol class="nav-child"><li class="nav-item nav-level-4"><a class="nav-link" href="#2-3-1-%E7%BD%91%E7%BB%9C%E9%85%8D%E7%BD%AE%E4%BF%A1%E6%81%AF"><span class="nav-text">2.3.1 网络配置信息</span></a><ol class="nav-child"><li class="nav-item nav-level-5"><a class="nav-link" href="#2-3-1-1-NAT%E6%A8%A1%E5%BC%8F%E7%BD%91%E7%BB%9C%E9%80%82%E9%85%8D%E5%99%A8"><span class="nav-text">2.3.1.1 NAT模式网络适配器</span></a></li><li class="nav-item nav-level-5"><a class="nav-link" href="#2-3-1-2-%E6%A1%A5%E6%8E%A5%E6%A8%A1%E5%BC%8F%E7%BD%91%E7%BB%9C%E9%80%82%E9%85%8D%E5%99%A8"><span class="nav-text">2.3.1.2 桥接模式网络适配器</span></a></li><li class="nav-item nav-level-5"><a class="nav-link" href="#2-3-1-3-%E6%89%93%E5%8D%B0%E7%BD%91%E7%BB%9C%E9%85%8D%E7%BD%AE%E4%BF%A1%E6%81%AF"><span class="nav-text">2.3.1.3 打印网络配置信息</span></a></li></ol></li><li class="nav-item nav-level-4"><a class="nav-link" href="#2-3-2-%E9%85%8D%E7%BD%AE%E6%A1%A5%E6%8E%A5%E7%BD%91%E7%BB%9C%E9%80%82%E9%85%8D%E5%99%A8"><span class="nav-text">2.3.2 配置桥接网络适配器</span></a><ol class="nav-child"><li class="nav-item nav-level-5"><a class="nav-link" href="#2-3-2-1-%E9%85%8D%E7%BD%AE%E6%AD%A5%E9%AA%A4"><span class="nav-text">2.3.2.1 配置步骤</span></a></li><li class="nav-item nav-level-5"><a class="nav-link" href="#2-3-2-2-%E7%BB%93%E6%9E%9C%E6%B5%8B%E8%AF%95"><span class="nav-text">2.3.2.2 结果测试 </span></a></li></ol></li><li class="nav-item nav-level-4"><a class="nav-link" href="#2-3-3-%E7%BD%91%E7%BB%9C%E9%80%82%E9%85%8D%E5%99%A8%E4%BC%98%E5%85%88%E7%BA%A7"><span class="nav-text">2.3.3 网络适配器优先级</span></a></li></ol></li><li class="nav-item nav-level-3"><a class="nav-link" href="#2-4-ubuntu-IP"><span class="nav-text">2.4 ubuntu IP</span></a></li></ol></li><li class="nav-item nav-level-2"><a class="nav-link" href="#3-linux%E5%BC%80%E5%8F%91%E6%9D%BF%E9%85%8D%E7%BD%AE"><span class="nav-text">3. linux开发板配置</span></a><ol class="nav-child"><li class="nav-item nav-level-3"><a class="nav-link" href="#3-1-MobaXterm%E8%BF%9E%E6%8E%A5%E5%BC%80%E5%8F%91%E6%9D%BF"><span class="nav-text">3.1 MobaXterm连接开发板</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#3-2-%E8%AE%BE%E7%BD%AE%E5%BC%80%E5%8F%91%E6%9D%BF-IP"><span class="nav-text">3.2 设置开发板 IP </span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#3-3-%E4%BA%92ping%E6%B5%8B%E8%AF%95"><span class="nav-text">3.3 互ping测试</span></a><ol class="nav-child"><li class="nav-item nav-level-4"><a class="nav-link" href="#3-3-1-linux%E5%BC%80%E5%8F%91%E6%9D%BF%E4%B8%8Ewindows"><span class="nav-text">3.3.1 linux开发板与windows</span></a></li><li class="nav-item nav-level-4"><a class="nav-link" href="#3-3-2-linux%E5%BC%80%E5%8F%91%E6%9D%BF%E4%B8%8Eubuntu"><span class="nav-text">3.3.2 linux开发板与ubuntu</span></a></li><li class="nav-item nav-level-4"><a class="nav-link" href="#3-3-3-%E9%97%AE%E9%A2%98%E5%A4%84%E7%90%86"><span class="nav-text">3.3.3 问题处理</span></a></li></ol></li><li class="nav-item nav-level-3"><a class="nav-link" href="#3-4-%E5%BC%80%E5%8F%91%E6%9D%BF%E8%AE%BE%E7%BD%AE%E9%9D%99%E6%80%81-IP"><span class="nav-text">3.4 开发板设置静态 IP </span></a><ol class="nav-child"><li class="nav-item nav-level-4"><a class="nav-link" href="#3-4-1-%E5%87%86%E5%A4%87%E5%B7%A5%E4%BD%9C"><span class="nav-text">3.4.1 准备工作</span></a></li><li class="nav-item nav-level-4"><a class="nav-link" href="#3-4-2-%E8%87%AA%E5%90%AF%E5%8A%A8%E6%89%A7%E8%A1%8C%E5%91%BD%E4%BB%A4%E6%96%B9%E5%BC%8F"><span class="nav-text">3.4.2 自启动执行命令方式</span></a><ol class="nav-child"><li class="nav-item nav-level-5"><a class="nav-link" href="#3-4-2-1-%E6%96%B9%E5%BC%8F%E4%B8%80%EF%BC%9A%E4%BF%AE%E6%94%B9rcS%E6%96%87%E4%BB%B6"><span class="nav-text">3.4.2.1 方式一：修改rcS文件</span></a></li><li class="nav-item nav-level-5"><a class="nav-link" href="#3-4-2-2-%E6%96%B9%E5%BC%8F%E4%BA%8C%EF%BC%9A%E4%BF%AE%E6%94%B9rc-local"><span class="nav-text">3.4.2.2 方式二：修改rc.local  </span></a></li></ol></li><li class="nav-item nav-level-4"><a class="nav-link" href="#3-4-3-%E4%BF%AE%E6%94%B9%E9%85%8D%E7%BD%AE%E6%96%87%E4%BB%B6%E6%96%B9%E5%BC%8F"><span class="nav-text">3.4.3 修改配置文件方式</span></a></li><li class="nav-item nav-level-4"><a class="nav-link" href="#3-4-4-%E8%AE%BE%E7%BD%AE%E4%B8%B4%E6%97%B6%E9%9D%99%E6%80%81IP"><span class="nav-text">3.4.4 设置临时静态IP</span></a></li></ol></li></ol></li><li class="nav-item nav-level-2"><a class="nav-link" href="#4-uboot%E9%85%8D%E7%BD%AE"><span class="nav-text">4. uboot配置</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#5-%E5%B0%8F%E7%BB%93"><span class="nav-text">5. 小结</span></a></li></ol></li><li class="nav-item nav-level-1"><a class="nav-link" href="#%E4%B8%89%E3%80%81%E5%85%B6%E4%BB%96%E7%BD%91%E7%BB%9C%E6%8B%93%E6%89%91%E7%BB%93%E6%9E%84"><span class="nav-text">三、其他网络拓扑结构</span></a><ol class="nav-child"><li class="nav-item nav-level-2"><a class="nav-link" href="#1-%E7%94%B5%E8%84%91%E5%92%8C%E5%BC%80%E5%8F%91%E6%9D%BF%E7%9B%B4%E8%BF%9E%E5%90%8C%E4%B8%AA%E8%B7%AF%E7%94%B1%E5%99%A8"><span class="nav-text">1. 电脑和开发板直连同个路由器  </span></a><ol class="nav-child"><li class="nav-item nav-level-3"><a class="nav-link" href="#1-1-%E5%87%86%E5%A4%87%E5%B7%A5%E4%BD%9C"><span class="nav-text">1.1 准备工作</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#1-2-VMware-%E8%AE%BE%E7%BD%AE"><span class="nav-text">1.2 VMware 设置  </span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#1-3-Ubuntu-%E8%AE%BE%E7%BD%AE"><span class="nav-text">1.3 Ubuntu 设置  </span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#1-4-Windows-%E8%AE%BE%E7%BD%AE"><span class="nav-text">1.4 Windows 设置  </span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#1-5-%E5%BC%80%E5%8F%91%E6%9D%BF%E8%AE%BE%E7%BD%AE"><span class="nav-text">1.5 开发板设置  </span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#1-6-ping-%E6%B5%8B%E8%AF%95"><span class="nav-text">1.6 ping 测试  </span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#1-7-%E5%B0%8F%E7%BB%93"><span class="nav-text">1.7 小结</span></a></li></ol></li><li class="nav-item nav-level-2"><a class="nav-link" href="#2-%E7%94%B5%E8%84%91%E5%92%8C%E5%BC%80%E5%8F%91%E6%9D%BF%E7%9B%B4%E8%BF%9E%E5%90%8C%E4%B8%AA%E4%BA%A4%E6%8D%A2%E6%9C%BA"><span class="nav-text">2. 电脑和开发板直连同个交换机  </span></a><ol class="nav-child"><li class="nav-item nav-level-3"><a class="nav-link" href="#2-1-%E5%87%86%E5%A4%87%E5%B7%A5%E4%BD%9C"><span class="nav-text">2.1 准备工作  </span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#2-2-VMware-%E8%AE%BE%E7%BD%AE"><span class="nav-text">2.2 VMware 设置  </span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#2-3-Ubuntu-%E8%AE%BE%E7%BD%AE"><span class="nav-text">2.3 Ubuntu 设置  </span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#2-4-Windows-%E8%AE%BE%E7%BD%AE"><span class="nav-text">2.4 Windows 设置  </span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#2-5-%E5%BC%80%E5%8F%91%E6%9D%BF%E8%AE%BE%E7%BD%AE"><span class="nav-text">2.5 开发板设置  </span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#2-6-ping-%E6%B5%8B%E8%AF%95"><span class="nav-text">2.6 ping 测试  </span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#2-7-%E5%B0%8F%E7%BB%93"><span class="nav-text">2.7 小结</span></a></li></ol></li></ol></li></ol></div>
        </div>
        <!--/noindex-->

        <div class="site-overview-wrap sidebar-panel">
          <div class="site-author animated" itemprop="author" itemscope itemtype="http://schema.org/Person">
    <img class="site-author-image" itemprop="image" alt="苏木"
      src="/images/avatar.jpg">
  <p class="site-author-name" itemprop="name">苏木</p>
  <div class="site-description" itemprop="description">莫道桑榆晚，为霞尚满天</div>
</div>
<div class="site-state-wrap animated">
  <nav class="site-state">
      <div class="site-state-item site-state-posts">
        <a href="/archives/">
          <span class="site-state-item-count">673</span>
          <span class="site-state-item-name">日志</span>
        </a>
      </div>
      <div class="site-state-item site-state-categories">
          <a href="/categories/">
        <span class="site-state-item-count">42</span>
        <span class="site-state-item-name">分类</span></a>
      </div>
      <div class="site-state-item site-state-tags">
        <span class="site-state-item-count">43</span>
        <span class="site-state-item-name">标签</span>
      </div>
  </nav>
</div>
  <div class="links-of-author animated">
      <span class="links-of-author-item">
        <a href="https://github.com/sumumm" title="GitHub → https:&#x2F;&#x2F;github.com&#x2F;sumumm" rel="noopener me" target="_blank"><i class="fab fa-github fa-fw"></i>GitHub</a>
      </span>
  </div>

        </div>
      </div>
    </div>

    
  </aside>


    </div>

    <div class="main-inner post posts-expand">


  


<div class="post-block">
  
  

  <article itemscope itemtype="http://schema.org/Article" class="post-content" lang="zh-CN">
    <link itemprop="mainEntityOfPage" href="https://sumumm.github.io/post/717d15a2.html">

    <span hidden itemprop="author" itemscope itemtype="http://schema.org/Person">
      <meta itemprop="image" content="/images/avatar.jpg">
      <meta itemprop="name" content="苏木">
    </span>

    <span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
      <meta itemprop="name" content="苏木">
      <meta itemprop="description" content="莫道桑榆晚，为霞尚满天">
    </span>

    <span hidden itemprop="post" itemscope itemtype="http://schema.org/CreativeWork">
      <meta itemprop="name" content="LV02-03-网络环境-01-网络开发环境搭建 | 苏木">
      <meta itemprop="description" content="">
    </span>
      <header class="post-header">
        <h1 class="post-title" itemprop="name headline">
          LV02-03-网络环境-01-网络开发环境搭建
        </h1>

        <div class="post-meta-container">
          <div class="post-meta">
    <span class="post-meta-item">
      <span class="post-meta-item-icon">
        <i class="far fa-calendar"></i>
      </span>
      <span class="post-meta-item-text">发表于</span>

      <time title="创建时间：2023-09-08 19:24:50" itemprop="dateCreated datePublished" datetime="2023-09-08T19:24:50+08:00">2023-09-08</time>
    </span>
    <span class="post-meta-item">
      <span class="post-meta-item-icon">
        <i class="far fa-folder"></i>
      </span>
      <span class="post-meta-item-text">分类于</span>
        <span itemprop="about" itemscope itemtype="http://schema.org/Thing">
          <a href="/categories/%E5%B5%8C%E5%85%A5%E5%BC%8F%E5%BC%80%E5%8F%91/" itemprop="url" rel="index"><span itemprop="name">嵌入式开发</span></a>
        </span>
          ，
        <span itemprop="about" itemscope itemtype="http://schema.org/Thing">
          <a href="/categories/%E5%B5%8C%E5%85%A5%E5%BC%8F%E5%BC%80%E5%8F%91/02IMX6ULL%E5%B9%B3%E5%8F%B0/" itemprop="url" rel="index"><span itemprop="name">02IMX6ULL平台</span></a>
        </span>
          ，
        <span itemprop="about" itemscope itemtype="http://schema.org/Thing">
          <a href="/categories/%E5%B5%8C%E5%85%A5%E5%BC%8F%E5%BC%80%E5%8F%91/02IMX6ULL%E5%B9%B3%E5%8F%B0/LV02-%E5%BC%80%E5%8F%91%E7%8E%AF%E5%A2%83/" itemprop="url" rel="index"><span itemprop="name">LV02-开发环境</span></a>
        </span>
    </span>

  
    <span class="post-meta-break"></span>
    <span class="post-meta-item" title="本文字数">
      <span class="post-meta-item-icon">
        <i class="far fa-file-word"></i>
      </span>
      <span class="post-meta-item-text">本文字数：</span>
      <span>16k</span>
    </span>
    <span class="post-meta-item" title="阅读时长">
      <span class="post-meta-item-icon">
        <i class="far fa-clock"></i>
      </span>
      <span class="post-meta-item-text">阅读时长 &asymp;</span>
      <span>58 分钟</span>
    </span>
</div>

        </div>
      </header>

    
    
    
    <div class="post-body" itemprop="articleBody"><p>本文主要网络环境的搭建——VMware使用双网卡的相关笔记，若笔记中有错误或者不合适的地方，欢迎批评指正😃。</p>
<span id="more"></span>

<!-- Photo: https://fanhua-picture.oss-cn-hangzhou.aliyuncs.com/01%E5%B5%8C%E5%85%A5%E5%BC%8F%E5%BC%80%E5%8F%91/02IMX6ULL%E5%B9%B3%E5%8F%B0/LV02-%E5%BC%80%E5%8F%91%E7%8E%AF%E5%A2%83/LV02-03-%E7%BD%91%E7%BB%9C%E7%8E%AF%E5%A2%83-01-%E7%BD%91%E7%BB%9C%E5%BC%80%E5%8F%91%E7%8E%AF%E5%A2%83%E6%90%AD%E5%BB%BA/img/ -->

<details class="folding-tag" blue><summary> 点击查看使用工具及版本 </summary>
              <div class='content'>
              <table>    <tr>        <td align="center" rowspan="5">PC端开发环境</td>        <td align="center" width=150px>Windows</td>        <td align="left">Windows11</td>    </tr>    <tr>        <td align="center">Ubuntu</td>        <td align="left">Ubuntu20.04.6的64位版本（一开始使用的是16.04版本，后来进行了升级）</td>      </tr>    <tr>        <td align="center">VMware® Workstation 17 Pro</td>        <td align="left">17.0.0 build-20800274</td>      </tr>    <tr>        <td align="center">终端软件</td>        <td align="left">MobaXterm(Professional Edition v23.0 Build 5042 (license))</td>    </tr>    <tr>        <td align="center">Win32DiskImager</td>        <td align="left">Win32DiskImager v1.0</td>      </tr>    <tr>        <td align="center" rowspan="3">Linux开发板环境</td>        <td align="center">Linux开发板</td>        <td align="left">正点原子 i.MX6ULL Linux 阿尔法开发板</td>      </tr>    <tr>        <td align="center">uboot</td>        <td align="left">NXP官方提供的uboot，NXP提供的版本为uboot-imx-rel_imx_4.1.15_2.1.0_ga(使用的uboot版本为U-Boot 2016.03)</td>      </tr>    <tr>        <td align="center">linux内核</td>        <td align="left">linux-4.15(NXP官方提供)</td>      </tr></table>
              </div>
            </details>

<details class="folding-tag" blue><summary> 点击查看本文参考资料 </summary>
              <div class='content'>
              <table>    <tr>        <td align="center">分类</td>        <td align="center">网址</td>        <td align="center">说明</td>    </tr>    <tr>        <td align="center" rowspan="5">官方网站</td>        <td align="left"><a href="https://www.arm.com/" target="_blank">https://www.arm.com/</a></td>        <td align="left">ARM官方网站，在这里我们可以找到Cotex-Mx以及ARMVx的一些文档</td>    </tr>    <tr>        <td align="left"><a href="https://www.nxp.com.cn/" target="_blank">https://www.nxp.com.cn/ </a></td>        <td align="left">NXP官方网站</td>    </tr>    <tr>        <td align="left"><a href="https://www.nxpic.org.cn/" target="_blank">https://www.nxpic.org.cn/</a></td><td align="left">NXP 官方社区</td>    </tr>    <tr>        <td align="left"><a href="https://u-boot.readthedocs.io/en/latest/" target="_blank">https://u-boot.readthedocs.io/en/latest/</a></td><td align="left">u-boot官网</td>    </tr>    <tr>        <td align="left"><a href="https://www.kernel.org/" target="_blank">https://www.kernel.org/</a></td><td align="left">linux内核官网</td>    </tr></table>
              </div>
            </details>

<details class="folding-tag" blue><summary> 点击查看相关文件下载 </summary>
              <div class='content'>
              <table>    <tr>        <td align="center">分类</td>        <td align="center">网址</td>        <td align="center">说明</td>    </tr>    <tr>        <td align="center" rowspan="4">NXP</td>        <td align="left"><a href="https://github.com/nxp-imx" target="_blank">https://github.com/nxp-imx</a></td>        <td align="left">NXP imx开发资源GitHub组织，里边会有u-boot和linux内核的仓库</td>    </tr>    <tr>        <td align="left"><a href="https://elixir.bootlin.com/linux/latest/source" target="_blank">https://elixir.bootlin.com/linux/latest/source</a></td>        <td align="left">在线阅读linux kernel源码</td>    </tr>    <tr>        <td align="left"><a href="https://github.com/nxp-imx/linux-imx/releases/tag/rel_imx_4.1.15_2.1.0_ga" target="_blank">nxp-imx/linux-imx/releases/tag/rel_imx_4.1.15_2.1.0_ga</a></td>        <td align="left">NXP linux内核仓库tags中的rel_imx_4.1.15_2.1.0_ga</td>    </tr>    <tr>        <td align="left"><a href="https://github.com/nxp-imx/uboot-imx/releases/tag/rel_imx_4.1.15_2.1.0_ga" target="_blank">nxp-imx/uboot-imx/releases/tag/rel_imx_4.1.15_2.1.0_ga</a></td>        <td align="left">NXP u-boot仓库tags中的rel_imx_4.1.15_2.1.0_ga</td>    </tr>    <tr>        <td align="center" rowspan="2">I.MX6ULL</td>        <td align="left"><a href="https://www.nxp.com.cn/docs/en/data-sheet/IMX6ULLIEC.pdf" target="_blank">i.MX 6ULL Applications Processors for Industrial Products</a></td>        <td align="left">I.MX6ULL 芯片手册（datasheet，可以在线查看）</td>    </tr>    <tr>        <td align="left"><a href="https://www.nxp.com.cn/webapp/Download?colCode=IMX6ULLRM&lang_cd=zh" target="_blank">i.MX 6ULL Applications ProcessorReference Manual</a></td>        <td align="left">I.MX6ULL 参考手册（下载后才能查看，需要登录NXP官网）</td>    </tr></table>
              </div>
            </details>

<p>网络搭建的相关笔记是直接使用的正点原子出厂系统做的。这里主要记录电脑WiFi上网，设备和电脑网口直连的方式进行网络环境的搭建。</p>
<h1 id="一、准备工作"><a href="#一、准备工作" class="headerlink" title="一、准备工作"></a><font size=3>一、准备工作</font></h1><h2 id="1-扩展坞"><a href="#1-扩展坞" class="headerlink" title="1. 扩展坞"></a><font size=3>1. 扩展坞</font></h2><p>电脑接口不太够，我就买了一个Type-C的扩展坞，上边有扩展的网口，后续的开发都用的这个扩展坞上的网口，但其实电脑本身的网口也可以用，当然，网口够多的话。</p>
<img data-src="https://fanhua-picture.oss-cn-hangzhou.aliyuncs.com/01%E5%B5%8C%E5%85%A5%E5%BC%8F%E5%BC%80%E5%8F%91/02IMX6ULL%E5%B9%B3%E5%8F%B0/LV02-%E5%BC%80%E5%8F%91%E7%8E%AF%E5%A2%83/LV02-03-%E7%BD%91%E7%BB%9C%E7%8E%AF%E5%A2%83-01-%E7%BD%91%E7%BB%9C%E5%BC%80%E5%8F%91%E7%8E%AF%E5%A2%83%E6%90%AD%E5%BB%BA/img/image-20230717200554402.png" alt="image-20230717200554402" style="zoom:63%;" />

<h2 id="2-硬件连接方式"><a href="#2-硬件连接方式" class="headerlink" title="2. 硬件连接方式"></a><font size=3>2. 硬件连接方式</font></h2><p>使用场景：路由器离电脑比较远，只有一条网线。</p>
<p>设备：电脑（Windows）、正点原子 Linux 开发板（出厂系统）、路由器&#x2F;交换机、直通网线。 </p>
<img data-src="https://fanhua-picture.oss-cn-hangzhou.aliyuncs.com/01%E5%B5%8C%E5%85%A5%E5%BC%8F%E5%BC%80%E5%8F%91/02IMX6ULL%E5%B9%B3%E5%8F%B0/LV02-%E5%BC%80%E5%8F%91%E7%8E%AF%E5%A2%83/LV02-03-%E7%BD%91%E7%BB%9C%E7%8E%AF%E5%A2%83-01-%E7%BD%91%E7%BB%9C%E5%BC%80%E5%8F%91%E7%8E%AF%E5%A2%83%E6%90%AD%E5%BB%BA/img/image-20220718200404678.png" alt="image-20220718200404678" style="zoom:50%;" />

<p>我使用的电脑中安装了虚拟机 VMware ，在 VMware 中运行 Ubuntu 系统，电脑连接无线网实现上网，由于我使用了一个扩展坞，所以开发板的 ENET2 （这个网口是正点原子ALPHA开发板的默认的eth0网口）网口通过网线连接到扩展坞的网口，扩展坞通过 Type-C 连接到电脑，关于网络配置的相关硬件连接就是这个样子啦。</p>
<h2 id="3-关闭-Ubuntu-和-Windows-防火墙"><a href="#3-关闭-Ubuntu-和-Windows-防火墙" class="headerlink" title="3. 关闭 Ubuntu 和 Windows 防火墙  "></a><font size=3>3. 关闭 Ubuntu 和 Windows 防火墙  </font></h2><p>在 Ubuntu 和 Windows 互相通信之前，需要关闭防火墙。在 Windows 主机的控制面板\系统和安全\Windows Defender 防火墙中选择关闭防火墙。  这一步其实主要是windows中的防火墙，它有些版本是真的会拦截的，比如我后来个你想你windows之后的这个版本：</p>
<figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br></pre></td><td class="code"><pre><span class="line">版本	Windows 11 专业版</span><br><span class="line">版本号	23H2</span><br><span class="line">安装日期	‎2024/‎9/‎16</span><br><span class="line">操作系统版本	22631.4169</span><br><span class="line">体验	Windows Feature Experience Pack 1000.22700.1034.0</span><br></pre></td></tr></table></figure>

<p>在这个版本中我就遇到了开发板可以ping通ubuntu，但是windows和开发板，windows和ubuntu均会出现互相ping不通的情况，ubuntu也会ping不通开发板。</p>
<h3 id="3-1-Windows"><a href="#3-1-Windows" class="headerlink" title="3.1 Windows"></a><font size=3>3.1 Windows</font></h3><p>控制面板&rarr;系统和安全&rarr;Windows Defender 防火墙：</p>
<img data-src="https://fanhua-picture.oss-cn-hangzhou.aliyuncs.com/01%E5%B5%8C%E5%85%A5%E5%BC%8F%E5%BC%80%E5%8F%91/02IMX6ULL%E5%B9%B3%E5%8F%B0/LV02-%E5%BC%80%E5%8F%91%E7%8E%AF%E5%A2%83/LV02-03-%E7%BD%91%E7%BB%9C%E7%8E%AF%E5%A2%83-01-%E7%BD%91%E7%BB%9C%E5%BC%80%E5%8F%91%E7%8E%AF%E5%A2%83%E6%90%AD%E5%BB%BA/img/image-20240828070841191.png" alt="image-20240828070841191" style="zoom:63%;" />

<p>最后如自定义设置：</p>
<img data-src="https://fanhua-picture.oss-cn-hangzhou.aliyuncs.com/01%E5%B5%8C%E5%85%A5%E5%BC%8F%E5%BC%80%E5%8F%91/02IMX6ULL%E5%B9%B3%E5%8F%B0/LV02-%E5%BC%80%E5%8F%91%E7%8E%AF%E5%A2%83/LV02-03-%E7%BD%91%E7%BB%9C%E7%8E%AF%E5%A2%83-01-%E7%BD%91%E7%BB%9C%E5%BC%80%E5%8F%91%E7%8E%AF%E5%A2%83%E6%90%AD%E5%BB%BA/img/image-20240828070911740.png" alt="image-20240828070911740" style="zoom:67%;" />

<p>那我们要是不想关闭防火墙呢？毕竟关闭之后，我们的windows安全性也会降低，其实也是可以的，主要是我们需要设置一下策略，我们这样操作：</p>
<p>控制面板&rarr;系统和安全&rarr;Windows Defender 防火墙&rarr;高级设置&rarr;入站规则（允许别人ping是入站，所以在入站规则上进行操作）</p>
<img data-src="https://fanhua-picture.oss-cn-hangzhou.aliyuncs.com/01%E5%B5%8C%E5%85%A5%E5%BC%8F%E5%BC%80%E5%8F%91/02IMX6ULL%E5%B9%B3%E5%8F%B0/LV02-%E5%BC%80%E5%8F%91%E7%8E%AF%E5%A2%83/LV02-03-%E7%BD%91%E7%BB%9C%E7%8E%AF%E5%A2%83-01-%E7%BD%91%E7%BB%9C%E5%BC%80%E5%8F%91%E7%8E%AF%E5%A2%83%E6%90%AD%E5%BB%BA/img/image-20240917073009061.png" alt="image-20240917073009061" style="zoom:50%;" />

<p>这里我的是IPv4，所以打开这两个规则即可。</p>
<h3 id="3-2-Ubuntu"><a href="#3-2-Ubuntu" class="headerlink" title="3.2 Ubuntu"></a><font size=3>3.2 Ubuntu</font></h3><p>打开 Ubuntu 终端，使用以下指令关闭 Ubuntu 防火墙。  </p>
<figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">sudo ufw disable  </span><br></pre></td></tr></table></figure>

<img data-src="https://fanhua-picture.oss-cn-hangzhou.aliyuncs.com/01%E5%B5%8C%E5%85%A5%E5%BC%8F%E5%BC%80%E5%8F%91/02IMX6ULL%E5%B9%B3%E5%8F%B0/LV02-%E5%BC%80%E5%8F%91%E7%8E%AF%E5%A2%83/LV02-03-%E7%BD%91%E7%BB%9C%E7%8E%AF%E5%A2%83-01-%E7%BD%91%E7%BB%9C%E5%BC%80%E5%8F%91%E7%8E%AF%E5%A2%83%E6%90%AD%E5%BB%BA/img/image-20240828071120835.png" alt="image-20240828071120835" />

<h1 id="二、电脑WiFi上网，开发板和电脑直连"><a href="#二、电脑WiFi上网，开发板和电脑直连" class="headerlink" title="二、电脑WiFi上网，开发板和电脑直连 "></a><font size=3>二、电脑WiFi上网，开发板和电脑直连 </font></h1><h2 id="1-windows配置"><a href="#1-windows配置" class="headerlink" title="1. windows配置"></a><font size=3>1. windows配置</font></h2><p>接下来我们看一下在windows中需要做哪些配置。</p>
<h3 id="1-1-查看windows中有哪些网络适配器"><a href="#1-1-查看windows中有哪些网络适配器" class="headerlink" title="1.1 查看windows中有哪些网络适配器"></a><font size=3>1.1 查看windows中有哪些网络适配器</font></h3><ul>
<li>方式一</li>
</ul>
<p>【我的电脑】&rarr;【管理】&rarr;【设备管理器】&rarr;【网络适配器】</p>
<ul>
<li>方式二</li>
</ul>
<p> win + r 调出运行框，然后输入以下命令：</p>
<figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">devmgmt.msc</span><br></pre></td></tr></table></figure>

<p>按下 enter 按键就可以打开设备管理器，然后我们点开网络适配器即可看到电脑所有的网络适配器了：</p>
<img data-src="https://fanhua-picture.oss-cn-hangzhou.aliyuncs.com/01%E5%B5%8C%E5%85%A5%E5%BC%8F%E5%BC%80%E5%8F%91/02IMX6ULL%E5%B9%B3%E5%8F%B0/LV02-%E5%BC%80%E5%8F%91%E7%8E%AF%E5%A2%83/LV02-03-%E7%BD%91%E7%BB%9C%E7%8E%AF%E5%A2%83-01-%E7%BD%91%E7%BB%9C%E5%BC%80%E5%8F%91%E7%8E%AF%E5%A2%83%E6%90%AD%E5%BB%BA/img/image-20230717201127295.png" alt="image-20230717201127295" style="zoom:50%;" />

<p>第一个以 ASIX 开头的就是扩展坞连接后连接到扩展坞网口的网络适配器了，就是我们后边要用的。</p>
<h3 id="1-2-查看-windows-以太网网络适配器"><a href="#1-2-查看-windows-以太网网络适配器" class="headerlink" title="1.2 查看 windows 以太网网络适配器"></a><font size=3>1.2 查看 windows 以太网网络适配器</font></h3><h4 id="1-2-1-方式一"><a href="#1-2-1-方式一" class="headerlink" title="1.2.1 方式一"></a><font size=3>1.2.1 方式一</font></h4><p>当我们连接好扩展坞、电脑和 Linux 开发板后，我们打开网口的详细信息。【控制面板】&rarr;【网络和 Internet】&rarr;【网络和共享中心】或者我们直接在控制面板的地址栏输入下边的内容：</p>
<figure class="highlight markdown"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">控制面板\网络和 Internet\网络和共享中心</span><br></pre></td></tr></table></figure>

<p>然后就会打开网络和共享中心：</p>
<img data-src="https://fanhua-picture.oss-cn-hangzhou.aliyuncs.com/01%E5%B5%8C%E5%85%A5%E5%BC%8F%E5%BC%80%E5%8F%91/02IMX6ULL%E5%B9%B3%E5%8F%B0/LV02-%E5%BC%80%E5%8F%91%E7%8E%AF%E5%A2%83/LV02-03-%E7%BD%91%E7%BB%9C%E7%8E%AF%E5%A2%83-01-%E7%BD%91%E7%BB%9C%E5%BC%80%E5%8F%91%E7%8E%AF%E5%A2%83%E6%90%AD%E5%BB%BA/img/image-20230717201524314.png" alt="image-20230717201524314" style="zoom:50%;" />

<p>我们会发现，当开发板网口连接到扩展坞网口后，会出现一个以太网 2 的活动网络，然后我们【以太网2】&rarr;【详细信息】这样我们就可以看到这个网口连接的网络适配器的相关信息：</p>
<img data-src="https://fanhua-picture.oss-cn-hangzhou.aliyuncs.com/01%E5%B5%8C%E5%85%A5%E5%BC%8F%E5%BC%80%E5%8F%91/02IMX6ULL%E5%B9%B3%E5%8F%B0/LV02-%E5%BC%80%E5%8F%91%E7%8E%AF%E5%A2%83/LV02-03-%E7%BD%91%E7%BB%9C%E7%8E%AF%E5%A2%83-01-%E7%BD%91%E7%BB%9C%E5%BC%80%E5%8F%91%E7%8E%AF%E5%A2%83%E6%90%AD%E5%BB%BA/img/image-20230717201739190.png" alt="image-20230717201739190" style="zoom:50%;" />

<p>可能是以前配置过，不过不重要，后边我们会重新配置。</p>
<h4 id="1-2-2-方式二"><a href="#1-2-2-方式二" class="headerlink" title="1.2.2 方式二"></a><font size=3>1.2.2 方式二</font></h4><p>我们按下 Win + r 调出运行框，然后输入以下命令：</p>
<figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">ncpa.cpl</span><br></pre></td></tr></table></figure>

<p>按下enter按键后，就会看到以下弹窗：</p>
<img data-src="https://fanhua-picture.oss-cn-hangzhou.aliyuncs.com/01%E5%B5%8C%E5%85%A5%E5%BC%8F%E5%BC%80%E5%8F%91/02IMX6ULL%E5%B9%B3%E5%8F%B0/LV02-%E5%BC%80%E5%8F%91%E7%8E%AF%E5%A2%83/LV02-03-%E7%BD%91%E7%BB%9C%E7%8E%AF%E5%A2%83-01-%E7%BD%91%E7%BB%9C%E5%BC%80%E5%8F%91%E7%8E%AF%E5%A2%83%E6%90%AD%E5%BB%BA/img/image-20230717201926055.png" alt="image-20230717201926055" style="zoom:50%;" />

<p>这样我们也可以看到我们关心的以太网口连接到了哪一个网络适配器。</p>
<h3 id="1-3-设置网口IP"><a href="#1-3-设置网口IP" class="headerlink" title="1.3 设置网口IP"></a><font size=3>1.3 设置网口IP</font></h3><p>接下来就是设置这个网口的静态 IP 信息了，步骤如下</p>
<img data-src="https://fanhua-picture.oss-cn-hangzhou.aliyuncs.com/01%E5%B5%8C%E5%85%A5%E5%BC%8F%E5%BC%80%E5%8F%91/02IMX6ULL%E5%B9%B3%E5%8F%B0/LV02-%E5%BC%80%E5%8F%91%E7%8E%AF%E5%A2%83/LV02-03-%E7%BD%91%E7%BB%9C%E7%8E%AF%E5%A2%83-01-%E7%BD%91%E7%BB%9C%E5%BC%80%E5%8F%91%E7%8E%AF%E5%A2%83%E6%90%AD%E5%BB%BA/img/image-20230717202053859.png" alt="image-20230717202053859" style="zoom:50%;" />

<p>这里的 IP 地址我们设置的是 192.168.10.xxx 网段的，注意后边 Ubuntu 和开发板也要设置成同一网段。到这里我们 Windows 中的 IP 设置就完成了，要记得的是我们的 Windows 所设置的 IP 信息为：</p>
<figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line">IP地址  :192.168.10.100</span><br><span class="line">子网掩码 :255.255.255.0</span><br><span class="line">默认网关 :192.168.10.1</span><br></pre></td></tr></table></figure>

<h3 id="1-4-查看-windows-主机所有网络信息"><a href="#1-4-查看-windows-主机所有网络信息" class="headerlink" title="1.4 查看 windows 主机所有网络信息"></a><font size=3>1.4 查看 windows 主机所有网络信息</font></h3><p>我们按下组合键 win + r ，打开运行框，输入 cmd ，再按下 enter 便可以打开命令行，我们在命令行输入以下命令：</p>
<figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">ipconfig</span><br></pre></td></tr></table></figure>

<p>然后便会显示 Windows 中所有的 IP 配置信息：</p>
<details class="folding-tag" blue><summary> 点击查看详情 </summary>
              <div class='content'>
              <figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br><span class="line">28</span><br><span class="line">29</span><br><span class="line">30</span><br><span class="line">31</span><br><span class="line">32</span><br><span class="line">33</span><br><span class="line">34</span><br><span class="line">35</span><br><span class="line">36</span><br><span class="line">37</span><br><span class="line">38</span><br><span class="line">39</span><br><span class="line">40</span><br><span class="line">41</span><br><span class="line">42</span><br><span class="line">43</span><br><span class="line">44</span><br><span class="line">45</span><br><span class="line">46</span><br><span class="line">47</span><br><span class="line">48</span><br><span class="line">49</span><br><span class="line">50</span><br><span class="line">51</span><br><span class="line">52</span><br></pre></td><td class="code"><pre><span class="line">Windows IP 配置</span><br><span class="line"></span><br><span class="line"></span><br><span class="line">以太网适配器 以太网:</span><br><span class="line"></span><br><span class="line">   媒体状态  . . . . . . . . . . . . : 媒体已断开连接</span><br><span class="line">   连接特定的 DNS 后缀 . . . . . . . :</span><br><span class="line"></span><br><span class="line">无线局域网适配器 本地连接* 1:</span><br><span class="line"></span><br><span class="line">   媒体状态  . . . . . . . . . . . . : 媒体已断开连接</span><br><span class="line">   连接特定的 DNS 后缀 . . . . . . . :</span><br><span class="line"></span><br><span class="line">无线局域网适配器 本地连接* 10:</span><br><span class="line"></span><br><span class="line">   媒体状态  . . . . . . . . . . . . : 媒体已断开连接</span><br><span class="line">   连接特定的 DNS 后缀 . . . . . . . :</span><br><span class="line"></span><br><span class="line">以太网适配器 VMware Network Adapter VMnet1:</span><br><span class="line"></span><br><span class="line">   连接特定的 DNS 后缀 . . . . . . . :</span><br><span class="line">   本地链接 IPv6 地址. . . . . . . . : fe80::500b:eb0:3c9:6ba9%16</span><br><span class="line">   IPv4 地址 . . . . . . . . . . . . : 192.168.234.1</span><br><span class="line">   子网掩码  . . . . . . . . . . . . : 255.255.255.0</span><br><span class="line">   默认网关. . . . . . . . . . . . . :</span><br><span class="line"></span><br><span class="line">以太网适配器 VMware Network Adapter VMnet8:</span><br><span class="line"></span><br><span class="line">   连接特定的 DNS 后缀 . . . . . . . :</span><br><span class="line">   本地链接 IPv6 地址. . . . . . . . : fe80::aee4:54b2:f3f6:997a%6</span><br><span class="line">   IPv4 地址 . . . . . . . . . . . . : 192.168.19.1</span><br><span class="line">   子网掩码  . . . . . . . . . . . . : 255.255.255.0</span><br><span class="line">   默认网关. . . . . . . . . . . . . :</span><br><span class="line"></span><br><span class="line">以太网适配器 以太网 2:</span><br><span class="line"></span><br><span class="line">   连接特定的 DNS 后缀 . . . . . . . :</span><br><span class="line">   本地链接 IPv6 地址. . . . . . . . : fe80::b71d:e0de:15df:b50e%11</span><br><span class="line">   IPv4 地址 . . . . . . . . . . . . : 192.168.10.100</span><br><span class="line">   子网掩码  . . . . . . . . . . . . : 255.255.255.0</span><br><span class="line">   默认网关. . . . . . . . . . . . . : 192.168.10.1</span><br><span class="line"></span><br><span class="line">无线局域网适配器 WLAN:</span><br><span class="line"></span><br><span class="line">   连接特定的 DNS 后缀 . . . . . . . :</span><br><span class="line">   IPv6 地址 . . . . . . . . . . . . : 2409:8a28:a54:d560:6aec:3d23:92db:7fba</span><br><span class="line">   临时 IPv6 地址. . . . . . . . . . : 2409:8a28:a54:d560:8c37:dc6a:1aa9:65e1</span><br><span class="line">   本地链接 IPv6 地址. . . . . . . . : fe80::82b4:b2c2:18a2:65d1%2</span><br><span class="line">   IPv4 地址 . . . . . . . . . . . . : 192.168.10.110</span><br><span class="line">   子网掩码  . . . . . . . . . . . . : 255.255.255.0</span><br><span class="line">   默认网关. . . . . . . . . . . . . : fe80::1%2</span><br><span class="line">                                       192.168.10.1</span><br></pre></td></tr></table></figure>
              </div>
            </details>

<table>
    <tr><td align="center" width="300px">网络适配器名</td><td align="center">IP地址</td><td align="center">备注</td></tr>
    <tr><td align="left">以太网适配器<br>以太网2</td><td align="left">192.168.10.100 </td><td align="left">以太网的IP信息，默认有一个IP，需要手动修改。如果显示已断开，请将电脑网口接到开发板网口上</td></tr>
    <tr><td align="left">以太网适配器<br>VMware Network Adapter VMnet1 </td><td align="left">192.168.234.1</td><td align="left">在host-only模式下，动态分配虚拟系统的TCP/IP配置信息</td></tr>
    <tr><td align="left">以太网适配器<br>VMware Network Adapter VMnet8 </td><td align="left">192.168.19.1</td><td align="left">提供DHCP服务，用于主机和虚拟机互通，虚拟机上网</td></tr>
    <tr><td align="left">无线局域网适配器WLAN</td><td align="left">192.168.3.110</td><td align="left">用于Windows主机上网</td></tr>
    <tr><td align="left">以太网适配器<br>VMware Network Adapter VMnet0 </td><td align="left"></td><td align="left">不提供DHCP，用于桥接网络，要在虚拟网络编辑器设置手动设置IP</td></tr>
</table>

<p>我们在 Windows 终端看不到到 VMnet0 ，但是可以在虚拟网络编辑器中可以看到。这是我们用来桥接的网络适配器，不会自动分配 IP ，需要手动设置（在 Ubuntu 中设置，可以看 Ubuntu 设置部分）。这里要注意， VMnet0 设置的网段不能和 VMnet1 、 VMnet8 的网段一样，不然会有冲突。</p>
<h3 id="1-5-windows-IP"><a href="#1-5-windows-IP" class="headerlink" title="1.5 windows IP"></a><font size=3>1.5 windows IP</font></h3><p>这里记录一下windows中对于我们来讲比较重要的两个ip地址：</p>
<figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br></pre></td><td class="code"><pre><span class="line">以太网适配器 以太网 2:</span><br><span class="line">   IPv4 地址 . . . . . . . . . . . . : 192.168.10.100</span><br><span class="line">   子网掩码  . . . . . . . . . . . . : 255.255.255.0</span><br><span class="line">   默认网关. . . . . . . . . . . . . : 192.168.10.1</span><br><span class="line">   </span><br><span class="line">无线局域网适配器 WLAN:</span><br><span class="line">   IPv4 地址 . . . . . . . . . . . . : 192.168.10.110</span><br><span class="line">   子网掩码  . . . . . . . . . . . . : 255.255.255.0</span><br><span class="line">   默认网关. . . . . . . . . . . . . : 192.168.10.1</span><br></pre></td></tr></table></figure>

<h2 id="2-ubuntu配置"><a href="#2-ubuntu配置" class="headerlink" title="2. ubuntu配置"></a><font size=3>2. ubuntu配置</font></h2><p>我这里用的是ubuntu22.04版本，但是后面有一些奇奇怪怪的问题，换回了16.04或者20.04，不过影响不大，都基本一样的操作。</p>
<h3 id="2-1-双网卡？"><a href="#2-1-双网卡？" class="headerlink" title="2.1 双网卡？"></a><font size=3>2.1 双网卡？</font></h3><h4 id="2-1-1-NAT网卡"><a href="#2-1-1-NAT网卡" class="headerlink" title="2.1.1 NAT网卡"></a><font size=3>2.1.1 NAT网卡</font></h4><p>NAT 网卡： ubuntu 通过它上网，只要 Windows 能上网， ubuntu 就能上网。</p>
<p>NAT， 全称是Network Address Translation， 指网络地址转换。使用 NAT 网卡时， ubuntu 要访问外网，是委托 Windows 发出数据包，Windows 接收到回应后再转发给 ubuntu。外界看到的都是 Windows，看不到 ubuntu。使用 NAT 时，只要 Windows 能上网， ubuntu 就必定能上网， 无需设置 ubuntu 的网络。对于外界来说，就只能看到windows一个设备。</p>
<h4 id="2-1-2-桥接网卡"><a href="#2-1-2-桥接网卡" class="headerlink" title="2.1.2 桥接网卡"></a><font size=3>2.1.2 桥接网卡</font></h4><p>桥接网卡： ubuntu 通过它跟linux开发板联通。</p>
<p>使用桥接网卡时， ubuntu 就是使用一个真实的网卡，相当于开发板的网线也连接到这个真实的网卡上，对外界来说就相当于ubuntu也是一个单独的设备了。这样 Windows、 Ubuntu、开发板就都可以用过这个网卡互通了。  </p>
<h4 id="2-1-3-双网卡的虚拟机"><a href="#2-1-3-双网卡的虚拟机" class="headerlink" title="2.1.3 双网卡的虚拟机"></a><font size=3>2.1.3 双网卡的虚拟机</font></h4><p>使用双网卡的时候，是什么样子的？如下图所示：</p>
<img data-src="https://fanhua-picture.oss-cn-hangzhou.aliyuncs.com/01%E5%B5%8C%E5%85%A5%E5%BC%8F%E5%BC%80%E5%8F%91/02IMX6ULL%E5%B9%B3%E5%8F%B0/LV02-%E5%BC%80%E5%8F%91%E7%8E%AF%E5%A2%83/LV02-03-%E7%BD%91%E7%BB%9C%E7%8E%AF%E5%A2%83-01-%E7%BD%91%E7%BB%9C%E5%BC%80%E5%8F%91%E7%8E%AF%E5%A2%83%E6%90%AD%E5%BB%BA/img/image-20230717193548726.png" alt="image-20230717193548726" style="zoom: 33%;" />

<p>这是我以前的虚拟机的双网卡的情况。其实就是再添加一个网络适配器罢了。</p>
<h3 id="2-2-VMware桥接网络适配器"><a href="#2-2-VMware桥接网络适配器" class="headerlink" title="2.2. VMware桥接网络适配器"></a><font size=3>2.2. VMware桥接网络适配器</font></h3><h4 id="2-2-1-新建网络适配器"><a href="#2-2-1-新建网络适配器" class="headerlink" title="2.2.1 新建网络适配器"></a><font size=3>2.2.1 新建网络适配器</font></h4><p>首先我们为虚拟机新建一个网络适配器，用作桥接，新建的网络适配器用于和Windows、Linux开发板通信，原来的NAT网络适配器用于上网。</p>
<img data-src="https://fanhua-picture.oss-cn-hangzhou.aliyuncs.com/01%E5%B5%8C%E5%85%A5%E5%BC%8F%E5%BC%80%E5%8F%91/02IMX6ULL%E5%B9%B3%E5%8F%B0/LV02-%E5%BC%80%E5%8F%91%E7%8E%AF%E5%A2%83/LV02-03-%E7%BD%91%E7%BB%9C%E7%8E%AF%E5%A2%83-01-%E7%BD%91%E7%BB%9C%E5%BC%80%E5%8F%91%E7%8E%AF%E5%A2%83%E6%90%AD%E5%BB%BA/img/image-20230717194222879.png" alt="image-20230717194222879" style="zoom:50%;" />

<p>原来的网络适配器保持NAT模式，这样可以保证虚拟机正常上网，新建的网络适配器2我们设置为<strong>桥接模式</strong>：</p>
<img data-src="https://fanhua-picture.oss-cn-hangzhou.aliyuncs.com/01%E5%B5%8C%E5%85%A5%E5%BC%8F%E5%BC%80%E5%8F%91/02IMX6ULL%E5%B9%B3%E5%8F%B0/LV02-%E5%BC%80%E5%8F%91%E7%8E%AF%E5%A2%83/LV02-03-%E7%BD%91%E7%BB%9C%E7%8E%AF%E5%A2%83-01-%E7%BD%91%E7%BB%9C%E5%BC%80%E5%8F%91%E7%8E%AF%E5%A2%83%E6%90%AD%E5%BB%BA/img/image-20230717194406670.png" alt="image-20230717194406670" style="zoom:50%;" />

<p>这样我们的ubuntu就有了两个网络适配器：</p>
<img data-src="https://fanhua-picture.oss-cn-hangzhou.aliyuncs.com/01%E5%B5%8C%E5%85%A5%E5%BC%8F%E5%BC%80%E5%8F%91/02IMX6ULL%E5%B9%B3%E5%8F%B0/LV02-%E5%BC%80%E5%8F%91%E7%8E%AF%E5%A2%83/LV02-03-%E7%BD%91%E7%BB%9C%E7%8E%AF%E5%A2%83-01-%E7%BD%91%E7%BB%9C%E5%BC%80%E5%8F%91%E7%8E%AF%E5%A2%83%E6%90%AD%E5%BB%BA/img/image-20230717194520886.png" alt="image-20230717194520886" style="zoom:50%;" />

<h4 id="2-2-2-配置虚拟网络编辑器"><a href="#2-2-2-配置虚拟网络编辑器" class="headerlink" title="2.2.2 配置虚拟网络编辑器"></a><font size=3>2.2.2 配置虚拟网络编辑器</font></h4><ul>
<li>（1）我们打开虚拟网络编辑器：【编辑】&rarr;【虚拟网络编辑器】</li>
</ul>
<img data-src="https://fanhua-picture.oss-cn-hangzhou.aliyuncs.com/01%E5%B5%8C%E5%85%A5%E5%BC%8F%E5%BC%80%E5%8F%91/02IMX6ULL%E5%B9%B3%E5%8F%B0/LV02-%E5%BC%80%E5%8F%91%E7%8E%AF%E5%A2%83/LV02-03-%E7%BD%91%E7%BB%9C%E7%8E%AF%E5%A2%83-01-%E7%BD%91%E7%BB%9C%E5%BC%80%E5%8F%91%E7%8E%AF%E5%A2%83%E6%90%AD%E5%BB%BA/img/image-20220718212321708.png" alt="image-20220718212321708" style="zoom:50%;" />

<ul>
<li>（2）打开后界面如下，我们需要点击【更改设置】才可以修改各个参数</li>
</ul>
<img data-src="https://fanhua-picture.oss-cn-hangzhou.aliyuncs.com/01%E5%B5%8C%E5%85%A5%E5%BC%8F%E5%BC%80%E5%8F%91/02IMX6ULL%E5%B9%B3%E5%8F%B0/LV02-%E5%BC%80%E5%8F%91%E7%8E%AF%E5%A2%83/LV02-03-%E7%BD%91%E7%BB%9C%E7%8E%AF%E5%A2%83-01-%E7%BD%91%E7%BB%9C%E5%BC%80%E5%8F%91%E7%8E%AF%E5%A2%83%E6%90%AD%E5%BB%BA/img/image-20230717194823424.png" alt="image-20230717194823424" style="zoom: 50%;" />

<p>不清楚这里为什么会有VMnet0，应该是新版本的VMware所自动生成的，老版本的虚拟机可能会出现只有两个网络名称的情况，如下图，若是只有两个网络名称，我们就需要新建一个 VMnet0 ：</p>
<img data-src="https://fanhua-picture.oss-cn-hangzhou.aliyuncs.com/01%E5%B5%8C%E5%85%A5%E5%BC%8F%E5%BC%80%E5%8F%91/02IMX6ULL%E5%B9%B3%E5%8F%B0/LV02-%E5%BC%80%E5%8F%91%E7%8E%AF%E5%A2%83/LV02-03-%E7%BD%91%E7%BB%9C%E7%8E%AF%E5%A2%83-01-%E7%BD%91%E7%BB%9C%E5%BC%80%E5%8F%91%E7%8E%AF%E5%A2%83%E6%90%AD%E5%BB%BA/img/image-20230717195039946.png" alt="image-20230717195039946" style="zoom:50%;" />

<ul>
<li>（3）设置 VMnet0 网络信息</li>
</ul>
<img data-src="https://fanhua-picture.oss-cn-hangzhou.aliyuncs.com/01%E5%B5%8C%E5%85%A5%E5%BC%8F%E5%BC%80%E5%8F%91/02IMX6ULL%E5%B9%B3%E5%8F%B0/LV02-%E5%BC%80%E5%8F%91%E7%8E%AF%E5%A2%83/LV02-03-%E7%BD%91%E7%BB%9C%E7%8E%AF%E5%A2%83-01-%E7%BD%91%E7%BB%9C%E5%BC%80%E5%8F%91%E7%8E%AF%E5%A2%83%E6%90%AD%E5%BB%BA/img/image-20230717205606627.png" alt="image-20230717205606627" style="zoom:50%;" />

<p>这里的桥接网卡要选择连接了linux开发板的网口对应的网络适配器，也就是刚才windows中出现的以太网2所对应的网络适配器。这里我们选择桥接，然后桥接到 ASIX 开头的这个网络适配器，后边就用于跟 Windows 和 Linux 开发板通信使用了。</p>
<ul>
<li>（4）点击应用，然后退出就可以啦。</li>
</ul>
<h4 id="2-2-3-虚拟网卡名简介"><a href="#2-2-3-虚拟网卡名简介" class="headerlink" title="2.2.3 虚拟网卡名简介"></a><font size=3>2.2.3 虚拟网卡名简介</font></h4><p>上边我们看到了有 VMnet0 、 VMnet1 和 VMnet8 ，这是啥？为啥要新建一个 VMnet0 ？</p>
<table>
    <tr><td align="center">虚拟网卡名</td><td align="center">网络属性</td><td align="center">定义</td></tr>
    <tr><td align="center">VMnet0</td><td align="center">物理网卡</td><td align="center">Bridge桥接</td></tr>
    <tr><td align="center">VMnet1</td><td align="center">虚拟网卡</td><td align="center">host-only仅主机</td></tr>
    <tr><td align="center">VMnet8</td><td align="center">虚拟网卡</td><td align="center">NAT</td></tr>
</table>
- 当虚拟机选择使用 VMnet0 网卡时

<p>使用 VMnet0 （桥接网络），虚拟机相当于网络当中的一台真实的机器，就是平时说的桥接模式，凡是选择使用桥接网络的系统就好像是局域网中的一个独立的主机， 就是和真实的计算机一模一样的主机， 并且它也连接到了这个真实的网络。因此如果要这个系统联网，就需要将这个系统和外面的真实主机采用相同的设置方法。</p>
<ul>
<li>当虚拟机选择使用 VMnet1 网卡时</li>
</ul>
<p>这表示这台虚拟机连接到 VMnet1 虚拟交换机，就是平时所说的仅主机模式。 VMnet1 ，官方定义为仅主机网路，其默认的网络行为，只与主机或使用 VMnet1 虚拟网卡的虚拟机有网络连接，使用 VMnet1 的虚拟网卡的虚拟机，不能访问与物理主机之外的其他计算机。也就是说，虚拟机之间、主机与虚拟机之间可以互相访问，但虚拟机无法访问外网。</p>
<ul>
<li>当虚拟机选择使用 VMnet8 网卡时</li>
</ul>
<p>如果虚拟机使用 VMnet8 ，也就是平时说的  NAT  网络模式，这种模式下虚拟机可以通过主机网络，单向（从虚拟机到主机、外网）访问物理主机之外的网络，而主机以外的网络不能访问使用 VMnet8 的虚拟机。但这个的前提是，主机要能访问外网（或网络上的其他计算机），如果主机不能访问外网，则配置为 VMnet8 虚拟网卡的虚拟机，也不能访问外网。</p>
<h4 id="2-2-4-可能出现的问题"><a href="#2-2-4-可能出现的问题" class="headerlink" title="2.2.4 可能出现的问题"></a><font size=3>2.2.4 可能出现的问题</font></h4><h5 id="2-2-4-1-问题一"><a href="#2-2-4-1-问题一" class="headerlink" title="2.2.4.1 问题一"></a><font size=3>2.2.4.1 问题一</font></h5><blockquote>
<p>在选择“已桥接至”网络适配器的时候找不到以太网口对应的网络适配器。</p>
</blockquote>
<p>这个时候我们打开以太网的详细信息，在属性中勾选 VMware Bridge Protocol 即可。</p>
<img data-src="https://fanhua-picture.oss-cn-hangzhou.aliyuncs.com/01%E5%B5%8C%E5%85%A5%E5%BC%8F%E5%BC%80%E5%8F%91/02IMX6ULL%E5%B9%B3%E5%8F%B0/LV02-%E5%BC%80%E5%8F%91%E7%8E%AF%E5%A2%83/LV02-03-%E7%BD%91%E7%BB%9C%E7%8E%AF%E5%A2%83-01-%E7%BD%91%E7%BB%9C%E5%BC%80%E5%8F%91%E7%8E%AF%E5%A2%83%E6%90%AD%E5%BB%BA/img/image-20220718213457711.png" alt="image-20220718213457711" style="zoom:50%;" />

<h5 id="2-2-4-2-问题二"><a href="#2-2-4-2-问题二" class="headerlink" title="2.2.4.2 问题二"></a><font size=3>2.2.4.2 问题二</font></h5><blockquote>
<p>虚拟网络编辑器中没有 VMnet0 ，新建的时候也没有 VMnet0 ，这时候怎么办呢？</p>
</blockquote>
<p>这个问题吧，目前还没有遇到过，网上直接搜的话是有解决办法的，遇到这个问题的时候我们可以尝试还原默认设置，或者是重装 VMware ，清理一下注册表之类的，后边遇到这个问题了再补充到这里。</p>
<h3 id="2-3-ubuntu网络配置"><a href="#2-3-ubuntu网络配置" class="headerlink" title="2.3 ubuntu网络配置"></a><font size=3>2.3 ubuntu网络配置</font></h3><h4 id="2-3-1-网络配置信息"><a href="#2-3-1-网络配置信息" class="headerlink" title="2.3.1 网络配置信息"></a><font size=3>2.3.1 网络配置信息</font></h4><h5 id="2-3-1-1-NAT模式网络适配器"><a href="#2-3-1-1-NAT模式网络适配器" class="headerlink" title="2.3.1.1 NAT模式网络适配器"></a><font size=3>2.3.1.1 NAT模式网络适配器</font></h5><p>在 Ubuntu 系统中，我们打开【设置】&rarr;【Network】便会看到如下信息：</p>
<img data-src="https://fanhua-picture.oss-cn-hangzhou.aliyuncs.com/01%E5%B5%8C%E5%85%A5%E5%BC%8F%E5%BC%80%E5%8F%91/02IMX6ULL%E5%B9%B3%E5%8F%B0/LV02-%E5%BC%80%E5%8F%91%E7%8E%AF%E5%A2%83/LV02-03-%E7%BD%91%E7%BB%9C%E7%8E%AF%E5%A2%83-01-%E7%BD%91%E7%BB%9C%E5%BC%80%E5%8F%91%E7%8E%AF%E5%A2%83%E6%90%AD%E5%BB%BA/img/image-20230717210414281.png" alt="image-20230717210414281" style="zoom:50%;" />

<p>我们会看到这里有两个网络名称，其中第一个ens33是已经自动分配的有 IP 地址的，这个其实就是我们使用 NAT 模式用于上网的网络适配器。此时这个 NAT 模式的网络适配器和 VMnet8 应当是在同一网段的（ 192.168.19.X ），如果不是在同一网段，可能是之前用户有设置过 Ubuntu 的 IP ，这里我们可以在这个网络的选项中将它设置为自动模式即可。我们点开看一下：</p>
<img data-src="https://fanhua-picture.oss-cn-hangzhou.aliyuncs.com/01%E5%B5%8C%E5%85%A5%E5%BC%8F%E5%BC%80%E5%8F%91/02IMX6ULL%E5%B9%B3%E5%8F%B0/LV02-%E5%BC%80%E5%8F%91%E7%8E%AF%E5%A2%83/LV02-03-%E7%BD%91%E7%BB%9C%E7%8E%AF%E5%A2%83-01-%E7%BD%91%E7%BB%9C%E5%BC%80%E5%8F%91%E7%8E%AF%E5%A2%83%E6%90%AD%E5%BB%BA/img/image-20230717210655203.png" alt="image-20230717210655203" style="zoom:50%;" />

<p>由于这个网络适配器的存在，我们的 Ubuntu 就可以上网，并且和 Windows 互通，我们在 ubuntu 中输入以下命令：</p>
<figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line">ping www.baidu.com    # ping 外网</span><br><span class="line">ping 192.168.10.110   # ping Windows(可以上网的那个ip)</span><br></pre></td></tr></table></figure>

<img data-src="https://fanhua-picture.oss-cn-hangzhou.aliyuncs.com/01%E5%B5%8C%E5%85%A5%E5%BC%8F%E5%BC%80%E5%8F%91/02IMX6ULL%E5%B9%B3%E5%8F%B0/LV02-%E5%BC%80%E5%8F%91%E7%8E%AF%E5%A2%83/LV02-03-%E7%BD%91%E7%BB%9C%E7%8E%AF%E5%A2%83-01-%E7%BD%91%E7%BB%9C%E5%BC%80%E5%8F%91%E7%8E%AF%E5%A2%83%E6%90%AD%E5%BB%BA/img/image-20230717211308890.png" alt="image-20230717211308890" style="zoom:50%;" />

<p>需要注意的是，这里默认使用的是ens33。</p>
<h5 id="2-3-1-2-桥接模式网络适配器"><a href="#2-3-1-2-桥接模式网络适配器" class="headerlink" title="2.3.1.2 桥接模式网络适配器"></a><font size=3>2.3.1.2 桥接模式网络适配器</font></h5><p>上边看完 NAT 模式的网络适配器，下边还有一个，这个当然就是我们设置为桥接模式的网络适配器啦，我们后边 再进行配置。</p>
<img data-src="https://fanhua-picture.oss-cn-hangzhou.aliyuncs.com/01%E5%B5%8C%E5%85%A5%E5%BC%8F%E5%BC%80%E5%8F%91/02IMX6ULL%E5%B9%B3%E5%8F%B0/LV02-%E5%BC%80%E5%8F%91%E7%8E%AF%E5%A2%83/LV02-03-%E7%BD%91%E7%BB%9C%E7%8E%AF%E5%A2%83-01-%E7%BD%91%E7%BB%9C%E5%BC%80%E5%8F%91%E7%8E%AF%E5%A2%83%E6%90%AD%E5%BB%BA/img/image-20230717211405617.png" alt="image-20230717211405617" style="zoom:50%;" />

<p>这个网络是什么都没有的，这就是我们需要配置的用于桥接网络的网络适配器 2 了，默认好像是关闭的（具体忘记了，因为写这篇笔记的时候我是删了用于桥接的网络，重新配置的，印象中默认是关闭的，不过问题不大，最后还是要打开的）。</p>
<h5 id="2-3-1-3-打印网络配置信息"><a href="#2-3-1-3-打印网络配置信息" class="headerlink" title="2.3.1.3 打印网络配置信息"></a><font size=3>2.3.1.3 打印网络配置信息</font></h5><p>我们可以通过以下命令来打印一下 Ubuntu 中的网络配置信息：</p>
<figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">ifconfig</span><br></pre></td></tr></table></figure>

<p>然后我们会看到如下信息输出：</p>
<figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br></pre></td><td class="code"><pre><span class="line">hk@ubuntu2204:~$ ifconfig</span><br><span class="line">ens33: flags=4163&lt;UP,BROADCAST,RUNNING,MULTICAST&gt;  mtu 1500</span><br><span class="line">        inet 192.168.19.131  netmask 255.255.255.0  broadcast 192.168.19.255</span><br><span class="line">        inet6 fe80::7bef:a0d9:48df:1aed  prefixlen 64  scopeid 0x20&lt;link&gt;</span><br><span class="line">        ether 00:0c:29:42:15:e2  txqueuelen 1000  (以太网)</span><br><span class="line">        RX packets 303  bytes 35390 (35.3 KB)</span><br><span class="line">        RX errors 0  dropped 0  overruns 0  frame 0</span><br><span class="line">        TX packets 231  bytes 23839 (23.8 KB)</span><br><span class="line">        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0</span><br><span class="line"></span><br><span class="line">ens37: flags=4163&lt;UP,BROADCAST,RUNNING,MULTICAST&gt;  mtu 1500</span><br><span class="line">        ether 00:0c:29:42:15:ec  txqueuelen 1000  (以太网)</span><br><span class="line">        RX packets 52  bytes 4886 (4.8 KB)</span><br><span class="line">        RX errors 0  dropped 0  overruns 0  frame 0</span><br><span class="line">        TX packets 173  bytes 28838 (28.8 KB)</span><br><span class="line">        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0</span><br><span class="line"></span><br><span class="line">lo: flags=73&lt;UP,LOOPBACK,RUNNING&gt;  mtu 65536</span><br><span class="line">        inet 127.0.0.1  netmask 255.0.0.0</span><br><span class="line">        inet6 ::1  prefixlen 128  scopeid 0x10&lt;host&gt;</span><br><span class="line">        loop  txqueuelen 1000  (本地环回)</span><br><span class="line">        RX packets 392  bytes 43790 (43.7 KB)</span><br><span class="line">        RX errors 0  dropped 0  overruns 0  frame 0</span><br><span class="line">        TX packets 392  bytes 43790 (43.7 KB)</span><br><span class="line">        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0</span><br></pre></td></tr></table></figure>

<h4 id="2-3-2-配置桥接网络适配器"><a href="#2-3-2-配置桥接网络适配器" class="headerlink" title="2.3.2 配置桥接网络适配器"></a><font size=3>2.3.2 配置桥接网络适配器</font></h4><h5 id="2-3-2-1-配置步骤"><a href="#2-3-2-1-配置步骤" class="headerlink" title="2.3.2.1 配置步骤"></a><font size=3>2.3.2.1 配置步骤</font></h5><p>下边我们就来配置一下这个用于桥接的网络适配器，也就是上边的ens37：</p>
<img data-src="https://fanhua-picture.oss-cn-hangzhou.aliyuncs.com/01%E5%B5%8C%E5%85%A5%E5%BC%8F%E5%BC%80%E5%8F%91/02IMX6ULL%E5%B9%B3%E5%8F%B0/LV02-%E5%BC%80%E5%8F%91%E7%8E%AF%E5%A2%83/LV02-03-%E7%BD%91%E7%BB%9C%E7%8E%AF%E5%A2%83-01-%E7%BD%91%E7%BB%9C%E5%BC%80%E5%8F%91%E7%8E%AF%E5%A2%83%E6%90%AD%E5%BB%BA/img/image-20230717211938008.png" alt="image-20230717211938008" style="zoom:50%;" />

<p>修改完毕后点击右上角的应用即可，这个时候可能IP还未配置成功，我们需要重新启动一些这个适配器。</p>
<img data-src="./https://fanhua-picture.oss-cn-hangzhou.aliyuncs.com/01%E5%B5%8C%E5%85%A5%E5%BC%8F%E5%BC%80%E5%8F%91/02IMX6ULL%E5%B9%B3%E5%8F%B0/LV02-%E5%BC%80%E5%8F%91%E7%8E%AF%E5%A2%83/LV02-03-%E7%BD%91%E7%BB%9C%E7%8E%AF%E5%A2%83-01-%E7%BD%91%E7%BB%9C%E5%BC%80%E5%8F%91%E7%8E%AF%E5%A2%83%E6%90%AD%E5%BB%BA/img/image-20240917090509002.png" alt="image-20240917090509002" style="zoom: 50%;" />

<h5 id="2-3-2-2-结果测试"><a href="#2-3-2-2-结果测试" class="headerlink" title="2.3.2.2 结果测试 "></a><font size=3>2.3.2.2 结果测试 </font></h5><p>我们来试一下：</p>
<figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line">ping www.baidu.com -I ens37  # ping 外网</span><br><span class="line">ping 192.168.10.110 -I ens37 # ping Windows(可以上网的那个ip)</span><br><span class="line">ping 192.168.10.100 -I ens37 # ping Windows(连接了开发板的那个以太网适配器的ip)</span><br></pre></td></tr></table></figure>

<p>然后会有以下结果：</p>
<img data-src="https://fanhua-picture.oss-cn-hangzhou.aliyuncs.com/01%E5%B5%8C%E5%85%A5%E5%BC%8F%E5%BC%80%E5%8F%91/02IMX6ULL%E5%B9%B3%E5%8F%B0/LV02-%E5%BC%80%E5%8F%91%E7%8E%AF%E5%A2%83/LV02-03-%E7%BD%91%E7%BB%9C%E7%8E%AF%E5%A2%83-01-%E7%BD%91%E7%BB%9C%E5%BC%80%E5%8F%91%E7%8E%AF%E5%A2%83%E6%90%AD%E5%BB%BA/img/image-20230717213127776.png" alt="image-20230717213127776" style="zoom:50%;" />

<p>可以看到这个适配器是只能ping通桥接到的那个网卡的。</p>
<h4 id="2-3-3-网络适配器优先级"><a href="#2-3-3-网络适配器优先级" class="headerlink" title="2.3.3 网络适配器优先级"></a><font size=3>2.3.3 网络适配器优先级</font></h4><p>上边我们设置好之后，会有一个问题就是，我们平时使用的时候优先使用哪个网络适配器呢？要是我们想上网，但是它默认使用了桥接模式的网络适配器，那这个时候是无法联网的。我们可以参考这篇文章：<a target="_blank" rel="noopener" href="http://www.openedv.com/forum.php?mod=viewthread&tid=333194&highlight=%CB%AB%EF%BF%BD%EF%BF%BD%EF%BF%BD%EF%BF%BD">虚拟机双网卡的一种处理方法-OpenEdv-开源电子网</a></p>
<img data-src="https://fanhua-picture.oss-cn-hangzhou.aliyuncs.com/01%E5%B5%8C%E5%85%A5%E5%BC%8F%E5%BC%80%E5%8F%91/02IMX6ULL%E5%B9%B3%E5%8F%B0/LV02-%E5%BC%80%E5%8F%91%E7%8E%AF%E5%A2%83/LV02-03-%E7%BD%91%E7%BB%9C%E7%8E%AF%E5%A2%83-01-%E7%BD%91%E7%BB%9C%E5%BC%80%E5%8F%91%E7%8E%AF%E5%A2%83%E6%90%AD%E5%BB%BA/img/image-20230717213312843.png" alt="image-20230717213312843" style="zoom:50%;" />

<p>但是有一个问题，那就是这里勾选后，无法应用，暂时不知道原因。后边有问题或者有解决办法的话再补充。</p>
<h3 id="2-4-ubuntu-IP"><a href="#2-4-ubuntu-IP" class="headerlink" title="2.4 ubuntu IP"></a><font size=3>2.4 ubuntu IP</font></h3><figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br></pre></td><td class="code"><pre><span class="line">ens33: flags=4163&lt;UP,BROADCAST,RUNNING,MULTICAST&gt;  mtu 1500</span><br><span class="line">        inet 192.168.19.131  netmask 255.255.255.0  broadcast 192.168.19.255</span><br><span class="line">        inet6 fe80::7bef:a0d9:48df:1aed  prefixlen 64  scopeid 0x20&lt;link&gt;</span><br><span class="line">        ether 00:0c:29:42:15:e2  txqueuelen 1000  (以太网)</span><br><span class="line">        RX packets 303  bytes 35390 (35.3 KB)</span><br><span class="line">        RX errors 0  dropped 0  overruns 0  frame 0</span><br><span class="line">        TX packets 231  bytes 23839 (23.8 KB)</span><br><span class="line">        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0</span><br><span class="line"></span><br><span class="line">ens37: flags=4163&lt;UP,BROADCAST,RUNNING,MULTICAST&gt;  mtu 1500</span><br><span class="line">        inet 192.168.10.101  netmask 255.255.255.0  broadcast 192.168.10.255</span><br><span class="line">        inet6 fe80::f6ae:862b:fa36:f281  prefixlen 64  scopeid 0x20&lt;link&gt;</span><br><span class="line">        ether 00:0c:29:67:b9:6d  txqueuelen 1000  (以太网)</span><br><span class="line">        RX packets 386  bytes 62233 (62.2 KB)</span><br><span class="line">        RX errors 0  dropped 0  overruns 0  frame 0</span><br><span class="line">        TX packets 304  bytes 25608 (25.6 KB)</span><br><span class="line">        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0</span><br><span class="line"></span><br><span class="line">lo: flags=73&lt;UP,LOOPBACK,RUNNING&gt;  mtu 65536</span><br><span class="line">        inet 127.0.0.1  netmask 255.0.0.0</span><br><span class="line">        inet6 ::1  prefixlen 128  scopeid 0x10&lt;host&gt;</span><br><span class="line">        loop  txqueuelen 1000  (本地环回)</span><br><span class="line">        RX packets 392  bytes 43790 (43.7 KB)</span><br><span class="line">        RX errors 0  dropped 0  overruns 0  frame 0</span><br><span class="line">        TX packets 392  bytes 43790 (43.7 KB)</span><br><span class="line">        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0</span><br></pre></td></tr></table></figure>



<h2 id="3-linux开发板配置"><a href="#3-linux开发板配置" class="headerlink" title="3. linux开发板配置"></a><font size=3>3. linux开发板配置</font></h2><p>这里用的是正点原子ALPHA开发板出厂的linux系统。</p>
<h3 id="3-1-MobaXterm连接开发板"><a href="#3-1-MobaXterm连接开发板" class="headerlink" title="3.1 MobaXterm连接开发板"></a><font size=3>3.1 MobaXterm连接开发板</font></h3><p>这个前边应该已经很熟练了。</p>
<h3 id="3-2-设置开发板-IP"><a href="#3-2-设置开发板-IP" class="headerlink" title="3.2 设置开发板 IP "></a><font size=3>3.2 设置开发板 IP </font></h3><p>我们的开发板启动后，我们可以通过以下命令来设置临时开发板的 IP 信息：</p>
<figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line">ifconfig eth0 up </span><br><span class="line">ifconfig eth0 192.168.10.103 </span><br></pre></td></tr></table></figure>

<p>【注意】这里的 IP 要跟 Windows 和 Ubuntu 在同一网段，即 192.168.10.X ，但是不能和他们重复。</p>
<p>然后我们输入 ifconfig 命令查看是否配置成功：</p>
<figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">ifconfig</span><br></pre></td></tr></table></figure>

<p>若设置成功吗，我们会看到如下信息：</p>
<img data-src="https://fanhua-picture.oss-cn-hangzhou.aliyuncs.com/01%E5%B5%8C%E5%85%A5%E5%BC%8F%E5%BC%80%E5%8F%91/02IMX6ULL%E5%B9%B3%E5%8F%B0/LV02-%E5%BC%80%E5%8F%91%E7%8E%AF%E5%A2%83/LV02-03-%E7%BD%91%E7%BB%9C%E7%8E%AF%E5%A2%83-01-%E7%BD%91%E7%BB%9C%E5%BC%80%E5%8F%91%E7%8E%AF%E5%A2%83%E6%90%AD%E5%BB%BA/img/image-20230717213629661.png" alt="image-20230717213629661" style="zoom: 50%;" />

<p>可以看到 IP 地址已经设置为 192.168.10.103  了</p>
<h3 id="3-3-互ping测试"><a href="#3-3-互ping测试" class="headerlink" title="3.3 互ping测试"></a><font size=3>3.3 互ping测试</font></h3><h4 id="3-3-1-linux开发板与windows"><a href="#3-3-1-linux开发板与windows" class="headerlink" title="3.3.1 linux开发板与windows"></a><font size=3>3.3.1 linux开发板与windows</font></h4><figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line">开发板   IP：192.168.10.103</span><br><span class="line">windows IP：192.168.10.100</span><br></pre></td></tr></table></figure>

<ul>
<li>开发板&rarr;windows</li>
</ul>
<p>我们在串口终端输入以下命令：</p>
<figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">ping 192.168.10.100</span><br></pre></td></tr></table></figure>

<p>看到如下信息，则是可以 ping 通：</p>
<img data-src="https://fanhua-picture.oss-cn-hangzhou.aliyuncs.com/01%E5%B5%8C%E5%85%A5%E5%BC%8F%E5%BC%80%E5%8F%91/02IMX6ULL%E5%B9%B3%E5%8F%B0/LV02-%E5%BC%80%E5%8F%91%E7%8E%AF%E5%A2%83/LV02-03-%E7%BD%91%E7%BB%9C%E7%8E%AF%E5%A2%83-01-%E7%BD%91%E7%BB%9C%E5%BC%80%E5%8F%91%E7%8E%AF%E5%A2%83%E6%90%AD%E5%BB%BA/img/image-20230717214627540.png" alt="image-20230717214627540" style="zoom:50%;" />

<ul>
<li>windows&rarr;开发板</li>
</ul>
<p>我们在windows的命令行执行以下命令：</p>
<figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">ping 192.168.10.103</span><br></pre></td></tr></table></figure>

<p>看到如下信息则表示可以ping通：</p>
<img data-src="https://fanhua-picture.oss-cn-hangzhou.aliyuncs.com/01%E5%B5%8C%E5%85%A5%E5%BC%8F%E5%BC%80%E5%8F%91/02IMX6ULL%E5%B9%B3%E5%8F%B0/LV02-%E5%BC%80%E5%8F%91%E7%8E%AF%E5%A2%83/LV02-03-%E7%BD%91%E7%BB%9C%E7%8E%AF%E5%A2%83-01-%E7%BD%91%E7%BB%9C%E5%BC%80%E5%8F%91%E7%8E%AF%E5%A2%83%E6%90%AD%E5%BB%BA/img/image-20230717214820330.png" alt="image-20230717214820330" style="zoom:50%;" />

<h4 id="3-3-2-linux开发板与ubuntu"><a href="#3-3-2-linux开发板与ubuntu" class="headerlink" title="3.3.2 linux开发板与ubuntu"></a><font size=3>3.3.2 linux开发板与ubuntu</font></h4><figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line">开发板  IP：192.168.10.103</span><br><span class="line">ubuntu IP：192.168.10.101</span><br></pre></td></tr></table></figure>

<ul>
<li>开发板&rarr;ubuntu</li>
</ul>
<p>我们在串口终端输入以下命令：</p>
<figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">ping 192.168.10.101</span><br></pre></td></tr></table></figure>

<p>看到如下信息，则是可以 ping 通：</p>
<img data-src="https://fanhua-picture.oss-cn-hangzhou.aliyuncs.com/01%E5%B5%8C%E5%85%A5%E5%BC%8F%E5%BC%80%E5%8F%91/02IMX6ULL%E5%B9%B3%E5%8F%B0/LV02-%E5%BC%80%E5%8F%91%E7%8E%AF%E5%A2%83/LV02-03-%E7%BD%91%E7%BB%9C%E7%8E%AF%E5%A2%83-01-%E7%BD%91%E7%BB%9C%E5%BC%80%E5%8F%91%E7%8E%AF%E5%A2%83%E6%90%AD%E5%BB%BA/img/image-20230717215017684.png" alt="image-20230717215017684" style="zoom:50%;" />

<ul>
<li>ubuntu&rarr;开发板</li>
</ul>
<p>我们在ubuntu的终端执行以下命令：</p>
<figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">ping 192.168.10.103</span><br></pre></td></tr></table></figure>

<p>看到如下信息则表示可以ping通：</p>
<img data-src="https://fanhua-picture.oss-cn-hangzhou.aliyuncs.com/01%E5%B5%8C%E5%85%A5%E5%BC%8F%E5%BC%80%E5%8F%91/02IMX6ULL%E5%B9%B3%E5%8F%B0/LV02-%E5%BC%80%E5%8F%91%E7%8E%AF%E5%A2%83/LV02-03-%E7%BD%91%E7%BB%9C%E7%8E%AF%E5%A2%83-01-%E7%BD%91%E7%BB%9C%E5%BC%80%E5%8F%91%E7%8E%AF%E5%A2%83%E6%90%AD%E5%BB%BA/img/image-20230717215137728.png" alt="image-20230717215137728" style="zoom:63%;" />

<h4 id="3-3-3-问题处理"><a href="#3-3-3-问题处理" class="headerlink" title="3.3.3 问题处理"></a><font size=3>3.3.3 问题处理</font></h4><p>有的时候可能会因为我们插错了网口导致无法ping通，重新插回对的网口似乎也不行，又或者是突然开发板就无法与windows通信了，这个时候可以尝试重启windows下的以太网适配器，可以先禁用再重启。</p>
<img data-src="https://fanhua-picture.oss-cn-hangzhou.aliyuncs.com/01%E5%B5%8C%E5%85%A5%E5%BC%8F%E5%BC%80%E5%8F%91/02IMX6ULL%E5%B9%B3%E5%8F%B0/LV02-%E5%BC%80%E5%8F%91%E7%8E%AF%E5%A2%83/LV02-03-%E7%BD%91%E7%BB%9C%E7%8E%AF%E5%A2%83-01-%E7%BD%91%E7%BB%9C%E5%BC%80%E5%8F%91%E7%8E%AF%E5%A2%83%E6%90%AD%E5%BB%BA/img/image-20230718225201521.png" alt="image-20230718225201521" style="zoom:50%;" />

<p>断开和重启的话，这个时候开发板可能会有如下打印信息：</p>
<img data-src="https://fanhua-picture.oss-cn-hangzhou.aliyuncs.com/01%E5%B5%8C%E5%85%A5%E5%BC%8F%E5%BC%80%E5%8F%91/02IMX6ULL%E5%B9%B3%E5%8F%B0/LV02-%E5%BC%80%E5%8F%91%E7%8E%AF%E5%A2%83/LV02-03-%E7%BD%91%E7%BB%9C%E7%8E%AF%E5%A2%83-01-%E7%BD%91%E7%BB%9C%E5%BC%80%E5%8F%91%E7%8E%AF%E5%A2%83%E6%90%AD%E5%BB%BA/img/image-20230718224810377.png" alt="image-20230718224810377" style="zoom:50%;" />

<h3 id="3-4-开发板设置静态-IP"><a href="#3-4-开发板设置静态-IP" class="headerlink" title="3.4 开发板设置静态 IP "></a><font size=3>3.4 开发板设置静态 IP </font></h3><p>上边的设置完成后会有一个问题，就是当我们复位开发板后， IP 又变回以前的设置了，这是由于 LAN 8720 PHY 网络芯片没有 MAC 地址，系统启动时会生成随机 MAC 地址给网络使用。每次都生成一个 MAC 地址，导致每次开机网络获取的 ip 不是固定的。  所以我们要设置给它一个静态的 ip，不因 MAC 地址的改变而改变，设置固定 ip 方法调试。 </p>
<p>那我们如何让它不再发生变化，设置成静态的 IP 呢？</p>
<h4 id="3-4-1-准备工作"><a href="#3-4-1-准备工作" class="headerlink" title="3.4.1 准备工作"></a><font size=3>3.4.1 准备工作</font></h4><p>如果开发板文件系统 &#x2F;etc&#x2F;init.d&#x2F; 下有 connman 文件，执行以下指令将 connman 命名为 connman2 ：</p>
<figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">mv /etc/init.d/connman /etc/init.d/connman2</span><br></pre></td></tr></table></figure>

<p>这样做是为了让系统找不到 connman 文件，就会关闭 connmand 网络连接守护进程，如果不关闭的话，在后面的设置完成后会有两个 IP 地址。如果文件系统下没有这个文件，就可以没有这一步了。然后就可以开始设置开发板的静态 IP 了，可以有两种方式，一种是自启动执行命令，另一种是修改配置文件。</p>
<h4 id="3-4-2-自启动执行命令方式"><a href="#3-4-2-自启动执行命令方式" class="headerlink" title="3.4.2 自启动执行命令方式"></a><font size=3>3.4.2 自启动执行命令方式</font></h4><h5 id="3-4-2-1-方式一：修改rcS文件"><a href="#3-4-2-1-方式一：修改rcS文件" class="headerlink" title="3.4.2.1 方式一：修改rcS文件"></a><font size=3>3.4.2.1 方式一：修改rcS文件</font></h5><p>在 MobaXterm 连接好开发板后，执行以下命令：</p>
<figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line">echo &quot;ifconfig eth0 192.168.10.103 netmask 255.255.255.0&quot; | tee -a /etc/init.d/rcS</span><br><span class="line">echo &quot;route add default gw 192.168.10.1&quot; | tee -a /etc/init.d/rcS</span><br></pre></td></tr></table></figure>

<p>以上命令中</p>
<ul>
<li>|  是管道，管道经常用于拼接命令;</li>
<li>tee 这个工具的作用就是把标准输出复制一份后放到对应的文件里;</li>
<li>-a 其实也就是 &gt;&gt; 即 shell 脚本中的重定向，表示追加的意思，追加就是在文件的后面写上要添加的指令，而不是覆盖源文件， &gt;&gt; 和 &gt; 不同的是， &gt; 是覆盖源文件（不能执行 &gt; ，要不然原来的配置会被覆盖了）。</li>
</ul>
<p>上边的命令也可以这样写：</p>
<figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line">echo &quot;ifconfig eth0 192.168.10.103 netmask 255.255.255.0&quot; | tee &gt;&gt; /etc/init.d/rcS </span><br><span class="line">echo &quot;route add default gw 192.168.10.1&quot; | tee &gt;&gt; /etc/init.d/rcS</span><br></pre></td></tr></table></figure>

<p>执行完以上命令后，以下命令：</p>
<figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">cat -n /etc/init.d/rcS</span><br></pre></td></tr></table></figure>

<p>可以发现 &#x2F;etc&#x2F;init.d&#x2F;rcS 文件最后两行会添加了以上两条命令，那么在开发板开机启动后，这两条命令便会执行。然后我们重启开发板，执行 ifconfig 指令或者 ip -a 查看 IP 地址，会发现与重启之前 IP 是一致的。这种设置的好处在于操作简单，一次修改成功，下次再重启开发板 IP 地址不会变化，即永久生效。</p>
<img data-src="https://fanhua-picture.oss-cn-hangzhou.aliyuncs.com/01%E5%B5%8C%E5%85%A5%E5%BC%8F%E5%BC%80%E5%8F%91/02IMX6ULL%E5%B9%B3%E5%8F%B0/LV02-%E5%BC%80%E5%8F%91%E7%8E%AF%E5%A2%83/LV02-03-%E7%BD%91%E7%BB%9C%E7%8E%AF%E5%A2%83-01-%E7%BD%91%E7%BB%9C%E5%BC%80%E5%8F%91%E7%8E%AF%E5%A2%83%E6%90%AD%E5%BB%BA/img/image-20230717215424090.png" alt="image-20230717215424090" style="zoom:50%;" />

<p>需要注意的是，这里我后来再搞的时候在这个位置写会不生效，暂时也不知道原因，但是如下图这样写就正常了：</p>
<img data-src="https://fanhua-picture.oss-cn-hangzhou.aliyuncs.com/01%E5%B5%8C%E5%85%A5%E5%BC%8F%E5%BC%80%E5%8F%91/02IMX6ULL%E5%B9%B3%E5%8F%B0/LV02-%E5%BC%80%E5%8F%91%E7%8E%AF%E5%A2%83/LV02-03-%E7%BD%91%E7%BB%9C%E7%8E%AF%E5%A2%83-01-%E7%BD%91%E7%BB%9C%E5%BC%80%E5%8F%91%E7%8E%AF%E5%A2%83%E6%90%AD%E5%BB%BA/img/image-20240426074115263.png" alt="image-20240426074115263" style="zoom:46%;" />

<figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line">ifconfig eth0 192.168.10.103 netmask 255.255.255.0</span><br><span class="line">route add default gw 192.168.10.1</span><br></pre></td></tr></table></figure>

<p>我猜测可能是写在最后的话，没有执行。</p>
<h5 id="3-4-2-2-方式二：修改rc-local"><a href="#3-4-2-2-方式二：修改rc-local" class="headerlink" title="3.4.2.2 方式二：修改rc.local  "></a><font size=3>3.4.2.2 方式二：修改rc.local  </font></h5><p>我们在出厂系统重打开或者创建 &#x2F;etc&#x2F;rc.local 文件：</p>
<figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">vi /etc/rc.local</span><br></pre></td></tr></table></figure>

<p>在文件的末尾添加如下内容：</p>
<figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line">PATH=/sbin:/bin:/usr/sbin:/usr/bin</span><br><span class="line">ifconfig eth0 192.168.10.103 netmask 255.255.255.0</span><br><span class="line">route add default gw 192.168.10.1</span><br></pre></td></tr></table></figure>

<p>如下图所示：</p>
<img data-src="https://fanhua-picture.oss-cn-hangzhou.aliyuncs.com/01%E5%B5%8C%E5%85%A5%E5%BC%8F%E5%BC%80%E5%8F%91/02IMX6ULL%E5%B9%B3%E5%8F%B0/LV02-%E5%BC%80%E5%8F%91%E7%8E%AF%E5%A2%83/LV02-03-%E7%BD%91%E7%BB%9C%E7%8E%AF%E5%A2%83-01-%E7%BD%91%E7%BB%9C%E5%BC%80%E5%8F%91%E7%8E%AF%E5%A2%83%E6%90%AD%E5%BB%BA/img/image-20240426074345579.png" alt="image-20240426074345579" style="zoom:50%;" />

<h4 id="3-4-3-修改配置文件方式"><a href="#3-4-3-修改配置文件方式" class="headerlink" title="3.4.3 修改配置文件方式"></a><font size=3>3.4.3 修改配置文件方式</font></h4><p>另一种方式就是修改配置文件，一般情况下配置文件路径为：</p>
<figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">/etc/network/interfaces</span><br></pre></td></tr></table></figure>

<p>需要注意的是，这个配置文件在有的文件系统中有，有的文件系统下没有，没有的话，这种可能方法就不适合了，反正也是一种方式，写在这里做参考。我们使用 vi 打开这个配置文件：</p>
<figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">vi /etc/network/interfaces</span><br></pre></td></tr></table></figure>

<p>原来的配置文件内容如下：</p>
<figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br><span class="line">28</span><br><span class="line">29</span><br><span class="line">30</span><br></pre></td><td class="code"><pre><span class="line"><span class="meta prompt_"># </span><span class="language-bash">/etc/network/interfaces -- configuration file <span class="keyword">for</span> ifup(8), ifdown(8)</span></span><br><span class="line"><span class="meta prompt_"></span></span><br><span class="line"><span class="meta prompt_"># </span><span class="language-bash">The loopback interface</span></span><br><span class="line">auto lo</span><br><span class="line">iface lo inet loopback</span><br><span class="line"><span class="meta prompt_"></span></span><br><span class="line"><span class="meta prompt_"># </span><span class="language-bash">Wireless interfaces</span></span><br><span class="line">iface wlan0 inet dhcp</span><br><span class="line">        wireless_mode managed</span><br><span class="line">        wireless_essid any</span><br><span class="line">        wpa-driver wext</span><br><span class="line">        wpa-conf /etc/wpa_supplicant.conf</span><br><span class="line"></span><br><span class="line">iface atml0 inet dhcp</span><br><span class="line"><span class="meta prompt_"></span></span><br><span class="line"><span class="meta prompt_"># </span><span class="language-bash">Wired or wireless interfaces</span></span><br><span class="line">auto eth0</span><br><span class="line">iface eth0 inet dhcp</span><br><span class="line">iface eth1 inet dhcp</span><br><span class="line"><span class="meta prompt_"></span></span><br><span class="line"><span class="meta prompt_"># </span><span class="language-bash">Ethernet/RNDIS gadget (g_ether)</span></span><br><span class="line"><span class="meta prompt_"># </span><span class="language-bash">... or on host side, usbnet and random hwaddr</span></span><br><span class="line">iface usb0 inet static</span><br><span class="line">        address 192.168.7.2</span><br><span class="line">        netmask 255.255.255.0</span><br><span class="line">        network 192.168.7.0</span><br><span class="line">        gateway 192.168.7.1</span><br><span class="line"><span class="meta prompt_"></span></span><br><span class="line"><span class="meta prompt_"># </span><span class="language-bash">Bluetooth networking</span></span><br><span class="line">iface bnep0 inet dhcp</span><br></pre></td></tr></table></figure>

<p>我们修改 Wired or wireless interfaces 部分为以下内容</p>
<figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br></pre></td><td class="code"><pre><span class="line"><span class="meta prompt_"># </span><span class="language-bash">Wired or wireless interfaces</span></span><br><span class="line">auto eth0</span><br><span class="line"><span class="meta prompt_"># </span><span class="language-bash">iface eth0 inet dhcp</span></span><br><span class="line">iface eth0 inet static</span><br><span class="line">address 192.168.10.103</span><br><span class="line">gateway 192.168.10.1 </span><br><span class="line">netmask 255.255.255.0</span><br><span class="line"></span><br><span class="line">iface eth1 inet dhcp</span><br></pre></td></tr></table></figure>

<p>就是这样：</p>
<img data-src="https://fanhua-picture.oss-cn-hangzhou.aliyuncs.com/01%E5%B5%8C%E5%85%A5%E5%BC%8F%E5%BC%80%E5%8F%91/02IMX6ULL%E5%B9%B3%E5%8F%B0/LV02-%E5%BC%80%E5%8F%91%E7%8E%AF%E5%A2%83/LV02-03-%E7%BD%91%E7%BB%9C%E7%8E%AF%E5%A2%83-01-%E7%BD%91%E7%BB%9C%E5%BC%80%E5%8F%91%E7%8E%AF%E5%A2%83%E6%90%AD%E5%BB%BA/img/image-20220719073057553.png" alt="image-20220719073057553" style="zoom:50%;" />

<p>修改完执行以下命令：</p>
<figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">/etc/init.d/networking restart # 重启网络配置</span><br></pre></td></tr></table></figure>

<p>这种修改方法是修改完配置文件，然后重启网络配置后就永久生效。</p>
<h4 id="3-4-4-设置临时静态IP"><a href="#3-4-4-设置临时静态IP" class="headerlink" title="3.4.4 设置临时静态IP"></a><font size=3>3.4.4 设置临时静态<code>IP</code></font></h4><p>我们在开发板文件系统中执行以下命令：</p>
<figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line">ifconfig eth0 192.168.10.103 netmask 255.255.255.0 </span><br><span class="line">route add default gw 192.168.10.1</span><br></pre></td></tr></table></figure>

<p>这种设置的好处在于，执行完指令不需重启开发板就生效，但是关机后下次再开机就会恢复原来的配置，即临时有效。</p>
<h2 id="4-uboot配置"><a href="#4-uboot配置" class="headerlink" title="4. uboot配置"></a><font size=3>4. uboot配置</font></h2><p>我们要是配置好uboot的网络信息，也是可以和windows、ubuntu ping通的。我们可以复位开发板，进入uboot：</p>
<img data-src="https://fanhua-picture.oss-cn-hangzhou.aliyuncs.com/01%E5%B5%8C%E5%85%A5%E5%BC%8F%E5%BC%80%E5%8F%91/02IMX6ULL%E5%B9%B3%E5%8F%B0/LV02-%E5%BC%80%E5%8F%91%E7%8E%AF%E5%A2%83/LV02-03-%E7%BD%91%E7%BB%9C%E7%8E%AF%E5%A2%83-01-%E7%BD%91%E7%BB%9C%E5%BC%80%E5%8F%91%E7%8E%AF%E5%A2%83%E6%90%AD%E5%BB%BA/img/image-20240917092842253.png" alt="image-20240917092842253" style="zoom:50%;" />

<p>然后执行以下命令：</p>
<figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br></pre></td><td class="code"><pre><span class="line">setenv ipaddr 192.168.10.103        # 开发板的IP</span><br><span class="line">setenv ethaddr 00:04:9f:04:d2:35    # 开发板的网卡物理地址，好像随便写一个就行</span><br><span class="line">setenv gatewayip 192.168.10.1       # 开发板的网关</span><br><span class="line">setenv netmask 255.255.255.0        # 子网掩码</span><br><span class="line">setenv serverip 192.168.10.101      # ubuntu作为服务器，这里是ubuntu的IP</span><br><span class="line">saveenv                             # 保存环境变量，这样下次启动也不会恢复原样</span><br></pre></td></tr></table></figure>

<p>如下图所示：</p>
<img data-src="https://fanhua-picture.oss-cn-hangzhou.aliyuncs.com/01%E5%B5%8C%E5%85%A5%E5%BC%8F%E5%BC%80%E5%8F%91/02IMX6ULL%E5%B9%B3%E5%8F%B0/LV02-%E5%BC%80%E5%8F%91%E7%8E%AF%E5%A2%83/LV02-03-%E7%BD%91%E7%BB%9C%E7%8E%AF%E5%A2%83-01-%E7%BD%91%E7%BB%9C%E5%BC%80%E5%8F%91%E7%8E%AF%E5%A2%83%E6%90%AD%E5%BB%BA/img/image-20240917093004239.png" alt="image-20240917093004239" style="zoom:50%;" />

<p>然后可以跟上面一样测试即可。</p>
<h2 id="5-小结"><a href="#5-小结" class="headerlink" title="5. 小结"></a><font size=3>5. 小结</font></h2><ul>
<li><p>防火墙设置：关闭电脑和虚拟机的防火墙（这一步看情况而定，有些可能根本不需要，有些可以通过修改策略进行）。</p>
</li>
<li><p>网络连接：电脑使用无线上网，开发板网口直连电脑网口。  </p>
</li>
<li><p>Windows 设置：手动设置以太网TCP&#x2F;IPv4属性中的IP信息。</p>
</li>
<li><p>VMwear设置：设置网络适配器为桥接模式；添加一个网络适配器2为NAT模式。  </p>
</li>
<li><p>Ubuntu 设置：设置NAT模式的网络适配器为自动获取模式（DHCP）；手动设置桥接模式 的网络适配器的IP信息。 </p>
</li>
<li><p>开发板设置：手动设置开发板的IP信息。</p>
</li>
</ul>
<blockquote>
<p>注意：</p>
<p>（1）Ubuntu里桥接模式的网络适配器、电脑的以太网、开发板的网口，<strong>三者要在同一网段</strong>，且不能与NAT模式的网络适配器、虚拟机子网在同一网段。Windows和Ubuntu通过NAT 模式的网络适配器通信。 </p>
<p>（2）其实上边我配置的IP都和windows的无线局域网适配器 WLAN在同一个网段了，这样看起来也没啥问题，但是要是想配置到别的网段可以嘛？当然也可以，只需要保证开发板、windows的以太网适配器 以太网x和ubuntu桥接模式的网路适配器这三者的IP在同一网段，例如（我当时测试的时候是没什么问题）：</p>
<p>windows：</p>
<figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line">IPv4 地址 . . . . . . . . . . . . : 192.168.5.10</span><br><span class="line">子网掩码  . . . . . . . . . . . . : 255.255.255.0</span><br><span class="line">默认网关. . . . . . . . . . . . . : 192.168.5.1</span><br></pre></td></tr></table></figure>

<p>ubuntu：</p>
<figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line">inet    192.168.5.11</span><br><span class="line">netmask 255.255.255.0</span><br><span class="line">gw      192.168.5.1 </span><br></pre></td></tr></table></figure>

<p>开发板：</p>
<figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line">inet    192.168.5.12</span><br><span class="line">netmask 255.255.255.0</span><br><span class="line">gw      192.168.5.1 </span><br></pre></td></tr></table></figure>
</blockquote>
<h1 id="三、其他网络拓扑结构"><a href="#三、其他网络拓扑结构" class="headerlink" title="三、其他网络拓扑结构"></a><font size=3>三、其他网络拓扑结构</font></h1><p>这部分我就没有做实验了，直接搬用文档，放在这里容易查看。</p>
<h2 id="1-电脑和开发板直连同个路由器"><a href="#1-电脑和开发板直连同个路由器" class="headerlink" title="1. 电脑和开发板直连同个路由器  "></a><font size=3>1. 电脑和开发板直连同个路由器  </font></h2><h3 id="1-1-准备工作"><a href="#1-1-准备工作" class="headerlink" title="1.1 准备工作"></a><font size=3>1.1 准备工作</font></h3><p>使用场景：电脑和路由器&#x2F;交换机比较近，有两条网线。这种容易搭建。</p>
<p>设备：电脑（Windows）、正点原子 Linux 开发板（出厂系统） 、路由器、直通网线（2 条） 。网络拓扑结构： 电脑网口通过直通网线连接到路由器&#x2F;交换机的 LAN 口，开发板网口通过直通网线连接到路由器&#x2F;交换机的 LAN 口，路由器&#x2F;交换机的 LAN 口接到外部宽带，从而实现上网。  </p>
<img data-src="https://fanhua-picture.oss-cn-hangzhou.aliyuncs.com/01%E5%B5%8C%E5%85%A5%E5%BC%8F%E5%BC%80%E5%8F%91/02IMX6ULL%E5%B9%B3%E5%8F%B0/LV02-%E5%BC%80%E5%8F%91%E7%8E%AF%E5%A2%83/LV02-03-%E7%BD%91%E7%BB%9C%E7%8E%AF%E5%A2%83-01-%E7%BD%91%E7%BB%9C%E5%BC%80%E5%8F%91%E7%8E%AF%E5%A2%83%E6%90%AD%E5%BB%BA/img/image-20240828070429692.png" alt="image-20240828070429692" style="zoom:50%;" />

<h3 id="1-2-VMware-设置"><a href="#1-2-VMware-设置" class="headerlink" title="1.2 VMware 设置  "></a><font size=3>1.2 VMware 设置  </font></h3><p>Ubuntu 设置：打开 VMware Workstation Pro 的 虚拟机 &rarr; 设置  ：</p>
<img data-src="https://fanhua-picture.oss-cn-hangzhou.aliyuncs.com/01%E5%B5%8C%E5%85%A5%E5%BC%8F%E5%BC%80%E5%8F%91/02IMX6ULL%E5%B9%B3%E5%8F%B0/LV02-%E5%BC%80%E5%8F%91%E7%8E%AF%E5%A2%83/LV02-03-%E7%BD%91%E7%BB%9C%E7%8E%AF%E5%A2%83-01-%E7%BD%91%E7%BB%9C%E5%BC%80%E5%8F%91%E7%8E%AF%E5%A2%83%E6%90%AD%E5%BB%BA/img/image-20240828070510372.png" alt="image-20240828070510372" style="zoom:50%;" />

<p>在虚拟机设置中，将 网络适配器 修改为 桥接模式 ，点击确定。  </p>
<img data-src="https://fanhua-picture.oss-cn-hangzhou.aliyuncs.com/01%E5%B5%8C%E5%85%A5%E5%BC%8F%E5%BC%80%E5%8F%91/02IMX6ULL%E5%B9%B3%E5%8F%B0/LV02-%E5%BC%80%E5%8F%91%E7%8E%AF%E5%A2%83/LV02-03-%E7%BD%91%E7%BB%9C%E7%8E%AF%E5%A2%83-01-%E7%BD%91%E7%BB%9C%E5%BC%80%E5%8F%91%E7%8E%AF%E5%A2%83%E6%90%AD%E5%BB%BA/img/image-20240828070527686.png" alt="image-20240828070527686" style="zoom:72%;" />

<h3 id="1-3-Ubuntu-设置"><a href="#1-3-Ubuntu-设置" class="headerlink" title="1.3 Ubuntu 设置  "></a><font size=3>1.3 Ubuntu 设置  </font></h3><p>打开 Ubuntu16 系统， 点击任务栏的设置 &rarr; 网络。  </p>
<img data-src="https://fanhua-picture.oss-cn-hangzhou.aliyuncs.com/01%E5%B5%8C%E5%85%A5%E5%BC%8F%E5%BC%80%E5%8F%91/02IMX6ULL%E5%B9%B3%E5%8F%B0/LV02-%E5%BC%80%E5%8F%91%E7%8E%AF%E5%A2%83/LV02-03-%E7%BD%91%E7%BB%9C%E7%8E%AF%E5%A2%83-01-%E7%BD%91%E7%BB%9C%E5%BC%80%E5%8F%91%E7%8E%AF%E5%A2%83%E6%90%AD%E5%BB%BA/img/image-20240828070604492.png" alt="image-20240828070604492" style="zoom:61%;" />

<p>在 Ubuntu 的网络设置这里可以看到 Ubuntu 系统的 IP 和网关、 DNS 等信息。 如果没有的话就打开右下角的 选项 按键。  </p>
<img data-src="https://fanhua-picture.oss-cn-hangzhou.aliyuncs.com/01%E5%B5%8C%E5%85%A5%E5%BC%8F%E5%BC%80%E5%8F%91/02IMX6ULL%E5%B9%B3%E5%8F%B0/LV02-%E5%BC%80%E5%8F%91%E7%8E%AF%E5%A2%83/LV02-03-%E7%BD%91%E7%BB%9C%E7%8E%AF%E5%A2%83-01-%E7%BD%91%E7%BB%9C%E5%BC%80%E5%8F%91%E7%8E%AF%E5%A2%83%E6%90%AD%E5%BB%BA/img/image-20240828070630227.png" alt="image-20240828070630227" style="zoom:66%;" />

<p>打开 选项 按键后，就打开了编译网络设置的界面，在这里可以选择 IPv4 设置，选择使用自动（DHCP）的方式来获取路由器分配的 IP，设置完成点击右下角的保存。  </p>
<img data-src="https://fanhua-picture.oss-cn-hangzhou.aliyuncs.com/01%E5%B5%8C%E5%85%A5%E5%BC%8F%E5%BC%80%E5%8F%91/02IMX6ULL%E5%B9%B3%E5%8F%B0/LV02-%E5%BC%80%E5%8F%91%E7%8E%AF%E5%A2%83/LV02-03-%E7%BD%91%E7%BB%9C%E7%8E%AF%E5%A2%83-01-%E7%BD%91%E7%BB%9C%E5%BC%80%E5%8F%91%E7%8E%AF%E5%A2%83%E6%90%AD%E5%BB%BA/img/image-20240828070652598.png" alt="image-20240828070652598" />

<p>设置完成后，并不会更新网络信息，会返回到刚刚的 网络 界面，点击下图中的开关按键，关闭网络后重新打开，就会更新网络信息。如果不进行此操作就不会更新设置。  </p>
<img data-src="https://fanhua-picture.oss-cn-hangzhou.aliyuncs.com/01%E5%B5%8C%E5%85%A5%E5%BC%8F%E5%BC%80%E5%8F%91/02IMX6ULL%E5%B9%B3%E5%8F%B0/LV02-%E5%BC%80%E5%8F%91%E7%8E%AF%E5%A2%83/LV02-03-%E7%BD%91%E7%BB%9C%E7%8E%AF%E5%A2%83-01-%E7%BD%91%E7%BB%9C%E5%BC%80%E5%8F%91%E7%8E%AF%E5%A2%83%E6%90%AD%E5%BB%BA/img/image-20240828070716645.png" alt="image-20240828070716645" style="zoom:67%;" />

<h3 id="1-4-Windows-设置"><a href="#1-4-Windows-设置" class="headerlink" title="1.4 Windows 设置  "></a><font size=3>1.4 Windows 设置  </font></h3><p>查看 Windows 主机的 IP：在 Windows 端按下 win + R 快捷键打开运行栏，输入 cmd 指令后按下回车。  </p>
<img data-src="https://fanhua-picture.oss-cn-hangzhou.aliyuncs.com/01%E5%B5%8C%E5%85%A5%E5%BC%8F%E5%BC%80%E5%8F%91/02IMX6ULL%E5%B9%B3%E5%8F%B0/LV02-%E5%BC%80%E5%8F%91%E7%8E%AF%E5%A2%83/LV02-03-%E7%BD%91%E7%BB%9C%E7%8E%AF%E5%A2%83-01-%E7%BD%91%E7%BB%9C%E5%BC%80%E5%8F%91%E7%8E%AF%E5%A2%83%E6%90%AD%E5%BB%BA/img/image-20240828071548778.png" alt="image-20240828071548778" />

<p>在打开的终端中输入 ipconfig 指令，查看电脑的 IP。  </p>
<figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">ipconfig</span><br></pre></td></tr></table></figure>

<img data-src="https://fanhua-picture.oss-cn-hangzhou.aliyuncs.com/01%E5%B5%8C%E5%85%A5%E5%BC%8F%E5%BC%80%E5%8F%91/02IMX6ULL%E5%B9%B3%E5%8F%B0/LV02-%E5%BC%80%E5%8F%91%E7%8E%AF%E5%A2%83/LV02-03-%E7%BD%91%E7%BB%9C%E7%8E%AF%E5%A2%83-01-%E7%BD%91%E7%BB%9C%E5%BC%80%E5%8F%91%E7%8E%AF%E5%A2%83%E6%90%AD%E5%BB%BA/img/image-20240828071611285.png" alt="image-20240828071611285" />

<h3 id="1-5-开发板设置"><a href="#1-5-开发板设置" class="headerlink" title="1.5 开发板设置  "></a><font size=3>1.5 开发板设置  </font></h3><p>开发板设置：直通网线的一端接正点原子 Linux 开发板的网口，如果是阿尔法开发板就接ENET2，另一端接路由器的 LAN 网口。 在串口终端输入 ifconfig 指令来查询开发板是否获取到路由器分配到的 IP。  </p>
<figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">ifconfig</span><br></pre></td></tr></table></figure>

<img data-src="https://fanhua-picture.oss-cn-hangzhou.aliyuncs.com/01%E5%B5%8C%E5%85%A5%E5%BC%8F%E5%BC%80%E5%8F%91/02IMX6ULL%E5%B9%B3%E5%8F%B0/LV02-%E5%BC%80%E5%8F%91%E7%8E%AF%E5%A2%83/LV02-03-%E7%BD%91%E7%BB%9C%E7%8E%AF%E5%A2%83-01-%E7%BD%91%E7%BB%9C%E5%BC%80%E5%8F%91%E7%8E%AF%E5%A2%83%E6%90%AD%E5%BB%BA/img/image-20240828071652401.png" alt="image-20240828071652401" style="zoom:78%;" />

<h3 id="1-6-ping-测试"><a href="#1-6-ping-测试" class="headerlink" title="1.6 ping 测试  "></a><font size=3>1.6 ping 测试  </font></h3><p>在 ping 测试之前要关闭 Windows 和 Ubuntu 的防火墙。  综合前面的设置，这里的 IP 如下。</p>
<figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line">Windows 主机 IP ： 192.168.3.6</span><br><span class="line">Ubuntu 虚拟机 IP： 192.168.3.7</span><br><span class="line">开发板 IP       ： 192.168.3.9</span><br></pre></td></tr></table></figure>

<p>接下来可以测试开发板和 Ubuntu、 Windows 互 ping。  </p>
<ul>
<li>开发板 ping 虚拟机 Ubuntu 的 IP</li>
</ul>
<figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">ping 192.168.3.7</span><br></pre></td></tr></table></figure>

<img data-src="https://fanhua-picture.oss-cn-hangzhou.aliyuncs.com/01%E5%B5%8C%E5%85%A5%E5%BC%8F%E5%BC%80%E5%8F%91/02IMX6ULL%E5%B9%B3%E5%8F%B0/LV02-%E5%BC%80%E5%8F%91%E7%8E%AF%E5%A2%83/LV02-03-%E7%BD%91%E7%BB%9C%E7%8E%AF%E5%A2%83-01-%E7%BD%91%E7%BB%9C%E5%BC%80%E5%8F%91%E7%8E%AF%E5%A2%83%E6%90%AD%E5%BB%BA/img/image-20240828071824556.png" alt="image-20240828071824556" style="zoom:97%;" />

<ul>
<li>Ubuntu 虚拟机 ping 开发板 IP</li>
</ul>
<figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">ping 192.168.3.9</span><br></pre></td></tr></table></figure>

<img data-src="https://fanhua-picture.oss-cn-hangzhou.aliyuncs.com/01%E5%B5%8C%E5%85%A5%E5%BC%8F%E5%BC%80%E5%8F%91/02IMX6ULL%E5%B9%B3%E5%8F%B0/LV02-%E5%BC%80%E5%8F%91%E7%8E%AF%E5%A2%83/LV02-03-%E7%BD%91%E7%BB%9C%E7%8E%AF%E5%A2%83-01-%E7%BD%91%E7%BB%9C%E5%BC%80%E5%8F%91%E7%8E%AF%E5%A2%83%E6%90%AD%E5%BB%BA/img/image-20240828071911422.png" alt="image-20240828071911422" style="zoom:85%;" />

<ul>
<li>Ubuntu 虚拟机 ping 外网。</li>
</ul>
<figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">ping www.baidu.com</span><br></pre></td></tr></table></figure>

<img data-src="https://fanhua-picture.oss-cn-hangzhou.aliyuncs.com/01%E5%B5%8C%E5%85%A5%E5%BC%8F%E5%BC%80%E5%8F%91/02IMX6ULL%E5%B9%B3%E5%8F%B0/LV02-%E5%BC%80%E5%8F%91%E7%8E%AF%E5%A2%83/LV02-03-%E7%BD%91%E7%BB%9C%E7%8E%AF%E5%A2%83-01-%E7%BD%91%E7%BB%9C%E5%BC%80%E5%8F%91%E7%8E%AF%E5%A2%83%E6%90%AD%E5%BB%BA/img/image-20240828071948345.png" alt="image-20240828071948345" />

<ul>
<li>开发板 ping 外网。</li>
</ul>
<figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">ping www.baidu.com</span><br></pre></td></tr></table></figure>

<img data-src="https://fanhua-picture.oss-cn-hangzhou.aliyuncs.com/01%E5%B5%8C%E5%85%A5%E5%BC%8F%E5%BC%80%E5%8F%91/02IMX6ULL%E5%B9%B3%E5%8F%B0/LV02-%E5%BC%80%E5%8F%91%E7%8E%AF%E5%A2%83/LV02-03-%E7%BD%91%E7%BB%9C%E7%8E%AF%E5%A2%83-01-%E7%BD%91%E7%BB%9C%E5%BC%80%E5%8F%91%E7%8E%AF%E5%A2%83%E6%90%AD%E5%BB%BA/img/image-20240828072053284.png" alt="image-20240828072053284" style="zoom:95%;" />

<ul>
<li>Windows 主机 ping 虚拟机 Ubuntu。</li>
</ul>
<figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">ping 192.168.3.7</span><br></pre></td></tr></table></figure>

<img data-src="https://fanhua-picture.oss-cn-hangzhou.aliyuncs.com/01%E5%B5%8C%E5%85%A5%E5%BC%8F%E5%BC%80%E5%8F%91/02IMX6ULL%E5%B9%B3%E5%8F%B0/LV02-%E5%BC%80%E5%8F%91%E7%8E%AF%E5%A2%83/LV02-03-%E7%BD%91%E7%BB%9C%E7%8E%AF%E5%A2%83-01-%E7%BD%91%E7%BB%9C%E5%BC%80%E5%8F%91%E7%8E%AF%E5%A2%83%E6%90%AD%E5%BB%BA/img/image-20240828072145728.png" alt="image-20240828072145728" />

<ul>
<li>在 Ubuntu 终端执行以下指令 ping 主机 Windows 的 IP。</li>
</ul>
<figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">ping 192.168.3.6</span><br></pre></td></tr></table></figure>

<img data-src="https://fanhua-picture.oss-cn-hangzhou.aliyuncs.com/01%E5%B5%8C%E5%85%A5%E5%BC%8F%E5%BC%80%E5%8F%91/02IMX6ULL%E5%B9%B3%E5%8F%B0/LV02-%E5%BC%80%E5%8F%91%E7%8E%AF%E5%A2%83/LV02-03-%E7%BD%91%E7%BB%9C%E7%8E%AF%E5%A2%83-01-%E7%BD%91%E7%BB%9C%E5%BC%80%E5%8F%91%E7%8E%AF%E5%A2%83%E6%90%AD%E5%BB%BA/img/image-20240828072223732.png" alt="image-20240828072223732" style="zoom:93%;" />

<h3 id="1-7-小结"><a href="#1-7-小结" class="headerlink" title="1.7 小结"></a><font size=3>1.7 小结</font></h3><blockquote>
<p>防火墙设置：关闭电脑和虚拟机的防火墙。</p>
<p>网络连接：开发板网口和电脑网口都通过网线直接连到同个路由器。</p>
<p>VMware 设置：设置网络适配器桥接模式，虚拟网络编辑器还原默认设置。</p>
<p>Ubuntu 设置：设置网络连接模式为自动（DHCP）。</p>
<p>Windows 设置：设置以太网 TCP&#x2F;IPv4 属性为自动获取 IP 地址。</p>
<p>开发板设置：出厂系统默认会自动获取 IP，没有这个功能的话可以执行以下指令获取 IP。  </p>
<figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line"><span class="meta prompt_">&gt;</span><span class="language-bash">ifconfig eth0 up</span></span><br><span class="line"><span class="meta prompt_">&gt;</span><span class="language-bash">udhcpc -i eth0</span></span><br></pre></td></tr></table></figure>
</blockquote>
<p>以上就是开发板、 Ubuntu 和 Windows 三者互 ping 测试，在开发板 uboot 命令行设置完开发板 IP 相关的信息后，也能 ping 虚拟机 Ubuntu。   </p>
<figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br></pre></td><td class="code"><pre><span class="line">setenv ipaddr 192.168.3.9</span><br><span class="line">setenv ethaddr 00:04:9f:04:d2:35</span><br><span class="line">setenv gatewayip 192.168.3.1</span><br><span class="line">setenv netmask 255.255.255.0</span><br><span class="line">setenv serverip 192.168.3.7</span><br><span class="line">saveenv</span><br><span class="line">ping 192.168.3.7</span><br></pre></td></tr></table></figure>

<img data-src="https://fanhua-picture.oss-cn-hangzhou.aliyuncs.com/01%E5%B5%8C%E5%85%A5%E5%BC%8F%E5%BC%80%E5%8F%91/02IMX6ULL%E5%B9%B3%E5%8F%B0/LV02-%E5%BC%80%E5%8F%91%E7%8E%AF%E5%A2%83/LV02-03-%E7%BD%91%E7%BB%9C%E7%8E%AF%E5%A2%83-01-%E7%BD%91%E7%BB%9C%E5%BC%80%E5%8F%91%E7%8E%AF%E5%A2%83%E6%90%AD%E5%BB%BA/img/image-20240828072502998.png" alt="image-20240828072502998" />

<p>uboot 阶段时， Ubuntu 虚拟机 ping 开发板是没有反馈的。  </p>
<h2 id="2-电脑和开发板直连同个交换机"><a href="#2-电脑和开发板直连同个交换机" class="headerlink" title="2. 电脑和开发板直连同个交换机  "></a><font size=3>2. 电脑和开发板直连同个交换机  </font></h2><h3 id="2-1-准备工作"><a href="#2-1-准备工作" class="headerlink" title="2.1 准备工作  "></a><font size=3>2.1 准备工作  </font></h3><p>使用场景：宽带可以直连交换机，有两条网线，没有路由器，没有 WiFi 或者无线网卡。</p>
<p>设备：电脑（Windows）、正点原子 Linux 开发板（出厂系统）、交换机、直通网线（2 条）。网络拓扑结构：  </p>
<img data-src="https://fanhua-picture.oss-cn-hangzhou.aliyuncs.com/01%E5%B5%8C%E5%85%A5%E5%BC%8F%E5%BC%80%E5%8F%91/02IMX6ULL%E5%B9%B3%E5%8F%B0/LV02-%E5%BC%80%E5%8F%91%E7%8E%AF%E5%A2%83/LV02-03-%E7%BD%91%E7%BB%9C%E7%8E%AF%E5%A2%83-01-%E7%BD%91%E7%BB%9C%E5%BC%80%E5%8F%91%E7%8E%AF%E5%A2%83%E6%90%AD%E5%BB%BA/img/image-20240828073323651.png" alt="image-20240828073323651" style="zoom:50%;" />

<p>直连路由器和直连交换机的效果是差不多的，只不过路由器会一个单独的网段，而交换机的网段和宽带分配的网段是一样的。 也就是一个是以路由器为中心的局域网，一个是以宽带为中心的局域网。  </p>
<h3 id="2-2-VMware-设置"><a href="#2-2-VMware-设置" class="headerlink" title="2.2 VMware 设置  "></a><font size=3>2.2 VMware 设置  </font></h3><p>打开 VMware Workstation Pro 的 虚拟机&rarr; 设置  </p>
<img data-src="https://fanhua-picture.oss-cn-hangzhou.aliyuncs.com/01%E5%B5%8C%E5%85%A5%E5%BC%8F%E5%BC%80%E5%8F%91/02IMX6ULL%E5%B9%B3%E5%8F%B0/LV02-%E5%BC%80%E5%8F%91%E7%8E%AF%E5%A2%83/LV02-03-%E7%BD%91%E7%BB%9C%E7%8E%AF%E5%A2%83-01-%E7%BD%91%E7%BB%9C%E5%BC%80%E5%8F%91%E7%8E%AF%E5%A2%83%E6%90%AD%E5%BB%BA/img/image-20240828073414246.png" alt="image-20240828073414246" style="zoom:50%;" />

<p>在虚拟机设置中，将 网络适配器 修改为 桥接模式 ，点击确定。  </p>
<img data-src="https://fanhua-picture.oss-cn-hangzhou.aliyuncs.com/01%E5%B5%8C%E5%85%A5%E5%BC%8F%E5%BC%80%E5%8F%91/02IMX6ULL%E5%B9%B3%E5%8F%B0/LV02-%E5%BC%80%E5%8F%91%E7%8E%AF%E5%A2%83/LV02-03-%E7%BD%91%E7%BB%9C%E7%8E%AF%E5%A2%83-01-%E7%BD%91%E7%BB%9C%E5%BC%80%E5%8F%91%E7%8E%AF%E5%A2%83%E6%90%AD%E5%BB%BA/img/image-20240828073438474.png" alt="image-20240828073438474" style="zoom: 70%;" />

<h3 id="2-3-Ubuntu-设置"><a href="#2-3-Ubuntu-设置" class="headerlink" title="2.3 Ubuntu 设置  "></a><font size=3>2.3 Ubuntu 设置  </font></h3><p>打开 Ubuntu16 系统，点击任务栏的设置 &rarr; 网络。  </p>
<img data-src="https://fanhua-picture.oss-cn-hangzhou.aliyuncs.com/01%E5%B5%8C%E5%85%A5%E5%BC%8F%E5%BC%80%E5%8F%91/02IMX6ULL%E5%B9%B3%E5%8F%B0/LV02-%E5%BC%80%E5%8F%91%E7%8E%AF%E5%A2%83/LV02-03-%E7%BD%91%E7%BB%9C%E7%8E%AF%E5%A2%83-01-%E7%BD%91%E7%BB%9C%E5%BC%80%E5%8F%91%E7%8E%AF%E5%A2%83%E6%90%AD%E5%BB%BA/img/image-20240828073536774.png" alt="image-20240828073536774" style="zoom: 62%;" />

<p>在 Ubuntu 的网络设置这里可以看到 Ubuntu 系统的 IP 和网关、 DNS 等信息。如果没有的话就打开右下角的 选项 按键。  </p>
<img data-src="https://fanhua-picture.oss-cn-hangzhou.aliyuncs.com/01%E5%B5%8C%E5%85%A5%E5%BC%8F%E5%BC%80%E5%8F%91/02IMX6ULL%E5%B9%B3%E5%8F%B0/LV02-%E5%BC%80%E5%8F%91%E7%8E%AF%E5%A2%83/LV02-03-%E7%BD%91%E7%BB%9C%E7%8E%AF%E5%A2%83-01-%E7%BD%91%E7%BB%9C%E5%BC%80%E5%8F%91%E7%8E%AF%E5%A2%83%E6%90%AD%E5%BB%BA/img/image-20240828073618438.png" alt="image-20240828073618438" style="zoom:67%;" />

<p>打开 选项 按键后，就打开了编译网络设置的界面，在这里可以选择 IPv4 设置，选择使用自动（DHCP）的方式来获取路由器分配的 IP，设置完成点击右下角的保存。  </p>
<img data-src="https://fanhua-picture.oss-cn-hangzhou.aliyuncs.com/01%E5%B5%8C%E5%85%A5%E5%BC%8F%E5%BC%80%E5%8F%91/02IMX6ULL%E5%B9%B3%E5%8F%B0/LV02-%E5%BC%80%E5%8F%91%E7%8E%AF%E5%A2%83/LV02-03-%E7%BD%91%E7%BB%9C%E7%8E%AF%E5%A2%83-01-%E7%BD%91%E7%BB%9C%E5%BC%80%E5%8F%91%E7%8E%AF%E5%A2%83%E6%90%AD%E5%BB%BA/img/image-20240828073633430.png" alt="image-20240828073633430" />

<p>设置完成后，并不会更新网络信息，会返回到刚刚的 网络 界面，点击下图中的开关按键，关闭网络后重新打开，就会更新网络信息。如果不进行此操作就不会更新设置。  </p>
<img data-src="https://fanhua-picture.oss-cn-hangzhou.aliyuncs.com/01%E5%B5%8C%E5%85%A5%E5%BC%8F%E5%BC%80%E5%8F%91/02IMX6ULL%E5%B9%B3%E5%8F%B0/LV02-%E5%BC%80%E5%8F%91%E7%8E%AF%E5%A2%83/LV02-03-%E7%BD%91%E7%BB%9C%E7%8E%AF%E5%A2%83-01-%E7%BD%91%E7%BB%9C%E5%BC%80%E5%8F%91%E7%8E%AF%E5%A2%83%E6%90%AD%E5%BB%BA/img/image-20240828073653258.png" alt="image-20240828073653258" style="zoom: 67%;" />

<h3 id="2-4-Windows-设置"><a href="#2-4-Windows-设置" class="headerlink" title="2.4 Windows 设置  "></a><font size=3>2.4 Windows 设置  </font></h3><p>查看 Windows 主机的 IP：在 Windows 端按下 win + R 快捷键打开运行栏，输入 cmd 指令后按下回车。  </p>
<img data-src="https://fanhua-picture.oss-cn-hangzhou.aliyuncs.com/01%E5%B5%8C%E5%85%A5%E5%BC%8F%E5%BC%80%E5%8F%91/02IMX6ULL%E5%B9%B3%E5%8F%B0/LV02-%E5%BC%80%E5%8F%91%E7%8E%AF%E5%A2%83/LV02-03-%E7%BD%91%E7%BB%9C%E7%8E%AF%E5%A2%83-01-%E7%BD%91%E7%BB%9C%E5%BC%80%E5%8F%91%E7%8E%AF%E5%A2%83%E6%90%AD%E5%BB%BA/img/image-20240828073726227.png" alt="image-20240828073726227" />

<p>在打开的终端中输入 ipconfig 指令，查看电脑的 IP。  </p>
<figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">ipconfig</span><br></pre></td></tr></table></figure>

<img data-src="https://fanhua-picture.oss-cn-hangzhou.aliyuncs.com/01%E5%B5%8C%E5%85%A5%E5%BC%8F%E5%BC%80%E5%8F%91/02IMX6ULL%E5%B9%B3%E5%8F%B0/LV02-%E5%BC%80%E5%8F%91%E7%8E%AF%E5%A2%83/LV02-03-%E7%BD%91%E7%BB%9C%E7%8E%AF%E5%A2%83-01-%E7%BD%91%E7%BB%9C%E5%BC%80%E5%8F%91%E7%8E%AF%E5%A2%83%E6%90%AD%E5%BB%BA/img/image-20240828073749805.png" alt="image-20240828073749805" style="zoom: 80%;" />

<h3 id="2-5-开发板设置"><a href="#2-5-开发板设置" class="headerlink" title="2.5 开发板设置  "></a><font size=3>2.5 开发板设置  </font></h3><p>开发板设置：直通网线的一端接正点原子 Linux 开发板的网口，如果是阿尔法开发板就接ENET2，另一端接电脑的以太网网口。在串口终端输入 ifconfig 指令来查询开发板是否获取到路由器分配到的 IP。  </p>
<figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">ifconfig</span><br></pre></td></tr></table></figure>

<img data-src="https://fanhua-picture.oss-cn-hangzhou.aliyuncs.com/01%E5%B5%8C%E5%85%A5%E5%BC%8F%E5%BC%80%E5%8F%91/02IMX6ULL%E5%B9%B3%E5%8F%B0/LV02-%E5%BC%80%E5%8F%91%E7%8E%AF%E5%A2%83/LV02-03-%E7%BD%91%E7%BB%9C%E7%8E%AF%E5%A2%83-01-%E7%BD%91%E7%BB%9C%E5%BC%80%E5%8F%91%E7%8E%AF%E5%A2%83%E6%90%AD%E5%BB%BA/img/image-20240828073835700.png" alt="image-20240828073835700" style="zoom:80%;" />

<h3 id="2-6-ping-测试"><a href="#2-6-ping-测试" class="headerlink" title="2.6 ping 测试  "></a><font size=3>2.6 ping 测试  </font></h3><p>在 ping 测试之前，要关闭 Windows 和 Ubuntu 的防火墙。这里的 IP 如下。  </p>
<figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line">Windows 主机 IP ： 192.168.1.158</span><br><span class="line">Ubuntu 虚拟机 IP： 192.168.1.194</span><br><span class="line">开发板 IP       ： 192.168.1.192</span><br></pre></td></tr></table></figure>

<p>这里和上面都是一样的，这里就不重复写了。</p>
<h3 id="2-7-小结"><a href="#2-7-小结" class="headerlink" title="2.7 小结"></a><font size=3>2.7 小结</font></h3><blockquote>
<p>防火墙设置：关闭电脑和虚拟机的防火墙。</p>
<p>网络连接：开发板网口和电脑网口都通过网线直接连到同个路由器。</p>
<p>VMware 设置：设置网络适配器桥接模式，虚拟网络编辑器还原默认设置。</p>
<p>Ubuntu 设置：设置网络连接模式为自动（DHCP）。</p>
<p>Windows 设置：设置以太网 TCP&#x2F;IPv4 属性为自动获取 IP 地址。</p>
<p>开发板设置：出厂系统默认会自动获取 IP，没有这个功能的话可以执行以下指令获取 IP。  </p>
<figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line"><span class="meta prompt_">&gt;</span><span class="language-bash">ifconfig eth0 up</span></span><br><span class="line"><span class="meta prompt_">&gt;</span><span class="language-bash">udhcpc -i eth0</span></span><br></pre></td></tr></table></figure>
</blockquote>

    </div>

    
    
    

    <footer class="post-footer">




    <div>
        
            <div style="text-align:center;color: #ccc;font-size:14px;">
            ----------本文结束
            <i class="fas fa-fan fa-spin" style="color: #FF1493; font-size: 1rem"></i>
            感谢您的阅读----------
            </div>
        
    </div>





  
  <div class="my_post_copyright"> 
    <p><span>文章标题:</span><a href="/post/717d15a2.html">LV02-03-网络环境-01-网络开发环境搭建</a></p>
    <p><span>文章作者:</span><a href="/" title="欢迎访问 《苏木》 的学习笔记">苏木</a></p>
    <p><span>发布时间:</span>2023年09月08日 - 19:24</p>
    <p><span>最后更新:</span>2025年06月14日 - 00:25</p>
    <p><span>原始链接:</span><a href="/post/717d15a2.html" title="LV02-03-网络环境-01-网络开发环境搭建">https://sumumm.github.io/post/717d15a2.html</a></p>
    <p><span>许可协议:</span><i class="fab fa-creative-commons"></i> <a rel="license" href= "https://creativecommons.org/licenses/by-nc-nd/4.0/" target="_blank" title="Attribution-NonCommercial-NoDerivatives 4.0 International (CC BY-NC-ND 4.0)">署名-非商业性使用-禁止演绎 4.0 国际</a> 转载请保留原文链接及作者。</p>  
  </div>
  


          <div class="post-tags">
              <a href="/tags/ALPHA-LV02-%E5%BC%80%E5%8F%91%E7%8E%AF%E5%A2%83/" rel="tag"><i class="fa fa-tag"></i> (ALPHA)LV02-开发环境</a>
          </div>

        

          <div class="post-nav">
            <div class="post-nav-item">
                <a href="/post/c042a73c.html" rel="prev" title="LV02-03-网络环境-02-TFTP环境搭建">
                  <i class="fa fa-angle-left"></i> LV02-03-网络环境-02-TFTP环境搭建
                </a>
            </div>
            <div class="post-nav-item">
                <a href="/post/7e3e4dc2.html" rel="next" title="LV02-02-串口调试终端与CH340驱动">
                  LV02-02-串口调试终端与CH340驱动 <i class="fa fa-angle-right"></i>
                </a>
            </div>
          </div>
    </footer>
  </article>
</div>






</div>
  </main>

  <footer class="footer">
    <div class="footer-inner">

  <div class="copyright">
    &copy; 2017 – 
    <span itemprop="copyrightYear">2025</span>
    <span class="with-love">
      <i class="fa fa-heart"></i>
    </span>
    <span class="author" itemprop="copyrightHolder">苏木</span>
  </div>
<div class="wordcount">
  <span class="post-meta-item">
    <span class="post-meta-item-icon">
      <i class="fa fa-chart-line"></i>
    </span>
      <span>站点总字数：</span>
    <span title="站点总字数">3.7m</span>
  </span>
  <span class="post-meta-item">
    <span class="post-meta-item-icon">
      <i class="fa fa-coffee"></i>
    </span>
      <span>站点阅读时长 &asymp;</span>
    <span title="站点阅读时长">225:26</span>
  </span>
</div>




    <span id="sitetime"></span>
    <script defer language=javascript>
        function siteTime()
        {
            window.setTimeout("siteTime()", 1000);
            var seconds = 1000;
            var minutes = seconds * 60;
            var hours = minutes * 60;
            var days = hours * 24;
            var years = days * 365;
            var today = new Date();
            var todayYear = today.getFullYear();
            var todayMonth = today.getMonth()+1;
            var todayDate = today.getDate();
            var todayHour = today.getHours();
            var todayMinute = today.getMinutes();
            var todaySecond = today.getSeconds();
            /*==================================================
            Date.UTC() -- 返回date对象距世界标准时间(UTC)1970年1月1日午夜之间的毫秒数(时间戳)
            year        - 作为date对象的年份，为4位年份值
            month       - 0-11之间的整数，做为date对象的月份
            day         - 1-31之间的整数，做为date对象的天数
            hours       - 0(午夜24点)-23之间的整数，做为date对象的小时数
            minutes     - 0-59之间的整数，做为date对象的分钟数
            seconds     - 0-59之间的整数，做为date对象的秒数
            microseconds - 0-999之间的整数，做为date对象的毫秒数
            ==================================================*/
            var t1 = Date.UTC(2017, 
                              5, 
                              19, 
                              0, 
                              0, 
                              0); //北京时间
            var t2 = Date.UTC(todayYear,todayMonth,todayDate,todayHour,todayMinute,todaySecond);
            var diff = t2-t1;
            var diffYears = Math.floor(diff/years);
            var diffDays = Math.floor((diff/days)-diffYears*365);
            var diffHours = Math.floor((diff-(diffYears*365+diffDays)*days)/hours);
            var diffMinutes = Math.floor((diff-(diffYears*365+diffDays)*days-diffHours*hours)/minutes);
            var diffSeconds = Math.floor((diff-(diffYears*365+diffDays)*days-diffHours*hours-diffMinutes*minutes)/seconds);
            document.getElementById("sitetime").innerHTML="已在这里 "+diffYears+" 年 "+diffDays+" 天 "+diffHours+" 小时 "+diffMinutes+" 分钟 "+diffSeconds+" 秒";
        }
        siteTime();
    </script>



    </div>
  </footer>

  
  <div class="back-to-top" role="button" aria-label="返回顶部">
    <i class="fa fa-arrow-up fa-lg"></i>
    <span>0%</span>
  </div>
  <div class="reading-progress-bar"></div>

<noscript>
  <div class="noscript-warning">Theme NexT works best with JavaScript enabled</div>
</noscript>


  
  <script src="https://cdnjs.cloudflare.com/ajax/libs/animejs/3.2.1/anime.min.js" integrity="sha256-XL2inqUJaslATFnHdJOi9GfQ60on8Wx1C2H8DYiN1xY=" crossorigin="anonymous"></script>
  <script src="https://cdnjs.cloudflare.com/ajax/libs/next-theme-pjax/0.6.0/pjax.min.js" integrity="sha256-vxLn1tSKWD4dqbMRyv940UYw4sXgMtYcK6reefzZrao=" crossorigin="anonymous"></script>
  <script src="https://cdnjs.cloudflare.com/ajax/libs/fancyapps-ui/5.0.28/fancybox/fancybox.umd.js" integrity="sha256-ytMJGN3toR+a84u7g7NuHm91VIR06Q41kMWDr2pq7Zo=" crossorigin="anonymous"></script>
  <script src="https://cdnjs.cloudflare.com/ajax/libs/lozad.js/1.16.0/lozad.min.js" integrity="sha256-mOFREFhqmHeQbXpK2lp4nA3qooVgACfh88fpJftLBbc=" crossorigin="anonymous"></script>
<script src="/js/comments.js"></script><script src="/js/utils.js"></script><script src="/js/motion.js"></script><script src="/js/next-boot.js"></script><script src="/js/pjax.js"></script>

  <script src="https://cdnjs.cloudflare.com/ajax/libs/hexo-generator-searchdb/1.4.1/search.js" integrity="sha256-1kfA5uHPf65M5cphT2dvymhkuyHPQp5A53EGZOnOLmc=" crossorigin="anonymous"></script>
<script src="/js/third-party/search/local-search.js"></script>




  <script src="/js/third-party/fancybox.js"></script>

  <script src="/js/third-party/pace.js"></script>


  




  

  <script class="next-config" data-name="enableMath" type="application/json">true</script><script class="next-config" data-name="mathjax" type="application/json">{"enable":true,"tags":"none","js":{"url":"https://cdnjs.cloudflare.com/ajax/libs/mathjax/3.2.2/es5/tex-mml-chtml.js","integrity":"sha256-MASABpB4tYktI2Oitl4t+78w/lyA+D7b/s9GEP0JOGI="}}</script>
<script src="/js/third-party/math/mathjax.js"></script>


 
        <div id="click-show-text"
            data-mobile = false
            data-text = 富强,民主,文明,和谐,自由,平等,公正,法制,爱国,敬业,诚信,友善
            data-fontsize = 15px
            data-random= false>
        </div>
       

      
        <script async src=https://cdn.jsdelivr.net/npm/hexo-next-mouse-effect@latest/click/showText.js></script>
      

      
    




    <script async src="/js/fancybox_param.js"></script>





<!-- APlayer本体 -->



</body>
</html>
